chore(core): remove @View annotation

Closes #7495
This commit is contained in:
Brian Ford
2016-03-08 13:36:48 -08:00
parent 095db673c5
commit f9fb72fb0e
85 changed files with 588 additions and 599 deletions
@@ -1,4 +1,4 @@
import {Component, View, ViewEncapsulation, OnChanges} from 'angular2/core';
import {Component, ViewEncapsulation, OnChanges} from 'angular2/core';
import {TimerWrapper} from 'angular2/src/facade/async';
import {isPresent} from 'angular2/src/facade/lang';
@@ -15,8 +15,6 @@ import {isPresent} from 'angular2/src/facade/lang';
'(blur)': 'onBlur()',
'[class.md-button-focus]': 'isKeyboardFocused',
},
})
@View({
templateUrl: 'package:angular2_material/src/components/button/button.html',
styleUrls: ['package:angular2_material/src/components/button/button.css'],
encapsulation: ViewEncapsulation.None,
@@ -59,8 +57,6 @@ export class MdButton {
'[class.md-button-focus]': 'isKeyboardFocused',
'[attr.aria-disabled]': 'isAriaDisabled',
},
})
@View({
templateUrl: 'package:angular2_material/src/components/button/button.html',
encapsulation: ViewEncapsulation.None
})
@@ -1,4 +1,4 @@
import {Component, View, Attribute, ViewEncapsulation} from 'angular2/core';
import {Component, Attribute, ViewEncapsulation} from 'angular2/core';
import {isPresent} from 'angular2/src/facade/lang';
import {KeyCodes} from 'angular2_material/src/core/key_codes';
import {KeyboardEvent} from 'angular2/src/facade/browser';
@@ -13,9 +13,7 @@ import {NumberWrapper} from 'angular2/src/facade/lang';
'[attr.aria-disabled]': 'disabled',
'[tabindex]': 'tabindex',
'(keydown)': 'onKeydown($event)',
}
})
@View({
},
templateUrl: 'package:angular2_material/src/components/checkbox/checkbox.html',
directives: [],
encapsulation: ViewEncapsulation.None
@@ -12,7 +12,6 @@ import {
ResolvedProvider,
SkipSelf,
Injector,
View,
ViewEncapsulation
} from 'angular2/core';
@@ -212,8 +211,6 @@ export class MdDialogConfig {
'tabindex': '0',
'(body:keydown)': 'documentKeypress($event)',
},
})
@View({
encapsulation: ViewEncapsulation.None,
templateUrl: 'package:angular2_material/src/components/dialog/dialog.html',
directives: [forwardRef(() => MdDialogContent)]
@@ -261,8 +258,9 @@ class MdDialogContent {
host: {
'(click)': 'onClick()',
},
template: '',
encapsulation: ViewEncapsulation.None
})
@View({template: '', encapsulation: ViewEncapsulation.None})
class MdBackdrop {
dialogRef: MdDialogRef;
@@ -1,6 +1,5 @@
import {
Component,
View,
ViewEncapsulation,
Host,
SkipSelf,
@@ -27,8 +26,9 @@ class RowHeightMode {
}
@Component({selector: 'md-grid-list', inputs: ['cols', 'rowHeight', 'gutterSize']})
@View({
@Component({
selector: 'md-grid-list',
inputs: ['cols', 'rowHeight', 'gutterSize'],
templateUrl: 'package:angular2_material/src/components/grid_list/grid_list.html',
encapsulation: ViewEncapsulation.None
})
@@ -223,9 +223,7 @@ export class MdGridList implements AfterContentChecked {
'[style.left]': 'style.left',
'[style.marginTop]': 'style.marginTop',
'[style.paddingTop]': 'style.paddingTop',
}
})
@View({
},
templateUrl: 'package:angular2_material/src/components/grid_list/grid_tile.html',
encapsulation: ViewEncapsulation.None
})
@@ -13,7 +13,7 @@ import {
xit,
} from 'angular2/testing_internal';
import {Component, View, ViewMetadata, bind, provide, DebugElement} from 'angular2/core';
import {Component, ViewMetadata, bind, provide, DebugElement} from 'angular2/core';
import {UrlResolver} from 'angular2/compiler';
import {MdButton, MdAnchor} from 'angular2_material/src/components/button/button';
@@ -114,8 +114,8 @@ function getChildDebugElement(parent: DebugElement, tagName: string): DebugEleme
}
/** Test component that contains an MdButton. */
@Component({selector: 'test-app'})
@View({
@Component({
selector: 'test-app',
directives: [MdButton],
template:
`<button mdButton type="button" (click)="increment()" [disabled]="isDisabled">Go</button>`