Я обновляю свойства угловых компонентов внутри блока, и я чувствую, что он не обновляетHtml

Программисты Html
Anonymous
Я обновляю свойства угловых компонентов внутри блока, и я чувствую, что он не обновляет

Сообщение Anonymous »

ngOnInit() {

this.router.events.subscribe(event => {
if (event instanceof NavigationEnd) {
if (event.url === '/common/time') {
this.zone.run(() => {
setTimeout(()=> {
this.index = 2;
this.trial = "Trial";
console.log(`Inside idx: ${this.index}`);
}, 100);
});
}
}
});

console.log(`Outside idx: ${this.index}`);
this.loadMonetaryCondition();
this.loadGoals();
}
< /code>
У меня есть такой шаблон, как этот блок уверен, выполняется. Но значения не обновлены. У меня есть шаблон следующим образом < /p>
Value {{index}} {{trial}}



Подробнее здесь: https://stackoverflow.com/questions/795 ... -feel-it-i

Вернуться в «Html»