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:
@ -1,9 +1,12 @@
|
||||
import {Component, View, LifecycleEvent} from 'angular2/angular2';
|
||||
import {Component, View, LifecycleEvent, ViewEncapsulation} from 'angular2/angular2';
|
||||
import {isPresent} from 'angular2/src/facade/lang';
|
||||
|
||||
|
||||
@Component({selector: '[md-button]:not([href])'})
|
||||
@View({templateUrl: 'package:angular2_material/src/components/button/button.html'})
|
||||
@View({
|
||||
templateUrl: 'package:angular2_material/src/components/button/button.html',
|
||||
encapsulation: ViewEncapsulation.NONE
|
||||
})
|
||||
export class MdButton {
|
||||
// TODO(jelbourn): Ink ripples.
|
||||
}
|
||||
@ -15,7 +18,10 @@ export class MdButton {
|
||||
host: {'(click)': 'onClick($event)', '[tabIndex]': 'tabIndex'},
|
||||
lifecycle: [LifecycleEvent.onChange]
|
||||
})
|
||||
@View({templateUrl: 'package:angular2_material/src/components/button/button.html'})
|
||||
@View({
|
||||
templateUrl: 'package:angular2_material/src/components/button/button.html',
|
||||
encapsulation: ViewEncapsulation.NONE
|
||||
})
|
||||
export class MdAnchor {
|
||||
tabIndex: number;
|
||||
|
||||
|
Reference in New Issue
Block a user