refactor(shadow_dom): remove ShadowDomStrategy in favor of @View(encapsulation)
BREAKING CHANGES: - `ShadowDomStrategy` was removed. To specify the encapsulation of a component use `@View(encapsulation: ViewEncapsulation.NONE | ViewEncapsulation.EMULATED | ViewEncapsulation.NATIVE)` - The default encapsulation strategy is now `ViewEncapsulation.EMULATED` if a component contains styles and `ViewEncapsulation.NONE` if it does not. Before this was always `NONE`. - `ViewLoader` now returns the template as a string and the styles as a separate array
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
Class
|
||||
} from '../../util/decorators';
|
||||
import {Type} from 'angular2/src/facade/lang';
|
||||
import {ViewEncapsulation} from 'angular2/src/render/api';
|
||||
|
||||
/**
|
||||
* Interface for the {@link Directive} decorator function.
|
||||
@@ -226,7 +227,7 @@ export interface ViewFactory {
|
||||
templateUrl?: string,
|
||||
template?: string,
|
||||
directives?: List<Type | any | List<any>>,
|
||||
renderer?: string,
|
||||
encapsulation?: ViewEncapsulation,
|
||||
styles?: List<string>,
|
||||
styleUrls?: List<string>,
|
||||
}): ViewDecorator;
|
||||
@@ -234,7 +235,7 @@ export interface ViewFactory {
|
||||
templateUrl?: string,
|
||||
template?: string,
|
||||
directives?: List<Type | any | List<any>>,
|
||||
renderer?: string,
|
||||
encapsulation?: ViewEncapsulation,
|
||||
styles?: List<string>,
|
||||
styleUrls?: List<string>,
|
||||
}): ViewAnnotation;
|
||||
|
||||
@@ -1 +1 @@
|
||||
export {View as ViewAnnotation} from '../annotations_impl/view';
|
||||
export {View as ViewAnnotation, ViewEncapsulation} from '../annotations_impl/view';
|
||||
|
||||
Reference in New Issue
Block a user