为什么这个组件在这个简单的
plunk
@Component({ selector: 'my-app',template: `<div>I'm {{message}} </div>`,}) export class App { message:string = 'loading :('; ngAfterViewInit() { this.updateMessage(); } updateMessage(){ this.message = 'all done loading :)' } }
投掷:
EXCEPTION: Expression ‘I’m {{message}} in App@0:5’ has changed after it was checked. PrevIoUs value: ‘I’m loading 原文链接:https://www.f2er.com/angularjs/146491.html