@ -16,7 +16,7 @@ import {IS_DART, isPresent, stringify} from 'angular2/src/facade/lang';
|
||||
import {bootstrap} from 'angular2/platform/browser';
|
||||
import {ApplicationRef} from 'angular2/src/core/application_ref';
|
||||
import {Console} from 'angular2/src/core/console';
|
||||
import {Component, Directive, View, OnDestroy, platform} from 'angular2/core';
|
||||
import {Component, Directive, OnDestroy, platform} from 'angular2/core';
|
||||
import {BROWSER_PROVIDERS, BROWSER_APP_PROVIDERS} from 'angular2/platform/browser';
|
||||
import {DOM} from 'angular2/src/platform/dom/dom_adapter';
|
||||
import {DOCUMENT} from 'angular2/src/platform/dom/dom_tokens';
|
||||
@ -27,36 +27,31 @@ import {ExceptionHandler} from 'angular2/src/facade/exceptions';
|
||||
import {Testability, TestabilityRegistry} from 'angular2/src/core/testability/testability';
|
||||
import {ComponentRef_, ComponentRef} from "angular2/src/core/linker/dynamic_component_loader";
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: '{{greeting}} world!'})
|
||||
@Component({selector: 'hello-app', template: '{{greeting}} world!'})
|
||||
class HelloRootCmp {
|
||||
greeting: string;
|
||||
constructor() { this.greeting = 'hello'; }
|
||||
}
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: 'before: <ng-content></ng-content> after: done'})
|
||||
@Component({selector: 'hello-app', template: 'before: <ng-content></ng-content> after: done'})
|
||||
class HelloRootCmpContent {
|
||||
constructor() {}
|
||||
}
|
||||
|
||||
@Component({selector: 'hello-app-2'})
|
||||
@View({template: '{{greeting}} world, again!'})
|
||||
@Component({selector: 'hello-app-2', template: '{{greeting}} world, again!'})
|
||||
class HelloRootCmp2 {
|
||||
greeting: string;
|
||||
constructor() { this.greeting = 'hello'; }
|
||||
}
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: ''})
|
||||
@Component({selector: 'hello-app', template: ''})
|
||||
class HelloRootCmp3 {
|
||||
appBinding;
|
||||
|
||||
constructor(@Inject("appBinding") appBinding) { this.appBinding = appBinding; }
|
||||
}
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: ''})
|
||||
@Component({selector: 'hello-app', template: ''})
|
||||
class HelloRootCmp4 {
|
||||
appRef;
|
||||
|
||||
@ -71,8 +66,7 @@ class HelloRootMissingTemplate {
|
||||
class HelloRootDirectiveIsNotCmp {
|
||||
}
|
||||
|
||||
@Component({selector: 'hello-app'})
|
||||
@View({template: ''})
|
||||
@Component({selector: 'hello-app', template: ''})
|
||||
class HelloOnDestroyTickCmp implements OnDestroy {
|
||||
appRef: ApplicationRef;
|
||||
constructor(@Inject(ApplicationRef) appRef) { this.appRef = appRef; }
|
||||
|
Reference in New Issue
Block a user