angular - AngularJS property change propagation -
i bit of newbie question, have spent day on it...
i have following angularjs2 app (using beta1):
@component({ selector: 'my-app', template: ` <btn></btn> `, directives: [button] }) class appcomponent {} bootstrap(appcomponent);
and have component defined like
@component({ selector: 'btn', template: ` <div [hidden]="active">aaaa!</div> <button (click)="onclick()">click me</button> ` }) export class button { active: boolean = false; onclick() { this.active = true; console.log(1) //successfully logs 1 console }
}
and guess - damn div won't hide.
thanks help!
how loading angular libraries files via system js or script tags ? if systemjs having same issue: https://github.com/angular/angular/issues/6719
if script tags might try :
<script src="node_modules/angular2/bundles/angular2-polyfills.js"></script> <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="node_modules/rxjs/bundles/rx.js"></script> <script src="node_modules/angular2/bundles/angular2.dev.js"></script>
Comments
Post a Comment