Using Reflect to get changeDetection setting - rxjs-space/notes GitHub Wiki
Dzmitry Shylovich @DzmitryShylovich 19:13 (2016-dec-2) @rxjs-space https://plnkr.co/edit/pxwZnNHY2Rg23U5Lju0A?p=preview it obviously doesn't work in aot
//our root app component
import {Component, NgModule,} from '@angular/core'
import {BrowserModule} from '@angular/platform-browser';
@Component({
selector: 'my-app',
template: `
<div>
<h2>Hello {{name}}</h2>
</div>
`,
})
export class App {
name:string;
constructor() {
this.name = 'Angular2';
var annotations = Reflect.getMetadata('annotations', this.constructor);
console.log(annotations);
console.log(annotations[0].changeDetection);
}
}
@NgModule({
imports: [ BrowserModule ],
declarations: [ App ],
bootstrap: [ App ]
})
export class AppModule {}