feat(ShadowDomStrategy): implemented EmulatedUnscopedShadowDomStrategy

- The new strategy do not scope component styles but make them global,
- The former EmulatedShadowStrategy has been renamed to
EmulatedScopedShadowDomStrategy. It does scope the styles.
This commit is contained in:
Victor Berchet
2015-02-26 12:29:17 +01:00
parent 9f181f39e9
commit 8541cfd26d
5 changed files with 151 additions and 29 deletions

View File

@ -12,7 +12,7 @@ import {ElementBinderBuilder} from './element_binder_builder';
import {ResolveCss} from './resolve_css';
import {ShimShadowDom} from './shim_shadow_dom';
import {DirectiveMetadata} from 'angular2/src/core/compiler/directive_metadata';
import {ShadowDomStrategy, EmulatedShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy';
import {ShadowDomStrategy, EmulatedScopedShadowDomStrategy} from 'angular2/src/core/compiler/shadow_dom_strategy';
/**
* Default steps used for compiling a template.
@ -39,7 +39,7 @@ export function createDefaultSteps(
new ElementBinderBuilder(parser),
];
if (shadowDomStrategy instanceof EmulatedShadowDomStrategy) {
if (shadowDomStrategy instanceof EmulatedScopedShadowDomStrategy) {
var step = new ShimShadowDom(compiledComponent, shadowDomStrategy);
ListWrapper.push(steps, step);
}