Событие, излучаемое углованием, не стреляетHtml

Программисты Html
Ответить
Anonymous
 Событие, излучаемое углованием, не стреляет

Сообщение Anonymous »

У меня есть следующее в Document-browser.component.html :

Код: Выделить всё




< /code>
document-form.component.ts< /code> расширяет класс baseformcomponent, который имеет < /p>

@output () savechanged: eventemiter = new Eventemiter (); < /p>
< /blockquote>
и в одном (baseformconcomponer). PrettyPrint-Override ">private _saving;

get saving(){ return this._saving; }

//this is fired whenever needed.
set saving(value:boolean){
this._saving=value;
this.saveChanged.emit(value);
}
< /code>
In document-browser.component.ts
Я раскрыл метод:

Код: Выделить всё

onSaveChanged(state: boolean){
console.log("onSaveChanged fired");
this.isSaving=state;
}
< /code>
The problem is that the onSaveChanged never gets fired.
I've implemented the exact same code in a slightly different scenario in document-page.component.html and the event fires as expected:












xxxxx


< /code>
document-page.component.ts
также реализует метод onsavechanged:
onSaveChanged(state:boolean){
this.isSaving=state;
}
< /code>
The document-form.component.ts is the same in both cases.
I've also attached a debugger and the setter is hit in both cases.
I am entirely new in Angular, so please help me understand why the method onSaveChanged is not fired in the first case.

Подробнее здесь: https://stackoverflow.com/questions/797 ... s-not-fire
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

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