Angular 2+ with Redux using ElementRef and Observable -
i been looking redux examples , noticed project observables. example:
html
<div #el_back_btn>button</div>
typescript
// elements @viewchild('el_back_btn') el_back_btn: elementref; const el_back_btn = observable.fromevent(this.el_back_btn.nativeelement, 'click') .subscribe(() => { this._navigationservice.goback(); });
this feels me wrong a)this looks me listening events time b)we accessing elementref not reading dom jquery does.
what performance issue , slow site strongly?
i'm thinking should more simple (click) , action needs preform in action file?
Comments
Post a Comment