angular-first-look-examples icon indicating copy to clipboard operation
angular-first-look-examples copied to clipboard

Storyline-Tracker: refactor toast to use Renderer

Open gilhanan opened this issue 8 years ago • 5 comments

Refactoring toast component to using Angular Renderer service. Additional, removed toast scroll which I didn't sure for what that meaning.

gilhanan avatar Jan 27 '17 16:01 gilhanan

thanks for the PR.

can you explain the pros and cons of this move for this use case?

johnpapa avatar Jan 27 '17 16:01 johnpapa

Yes of course,

when we access the native element directly we are giving up on Angular’s DOM abstraction and miss out on the opportunity to be able to execute also in none-DOM environments such as: native mobile, native desktop, web worker or server side rendering.

Explore The Renderer Service By: Netanel Basal

gilhanan avatar Jan 27 '17 16:01 gilhanan

I am aware of the Renderer service. But why do you feel this is a benefit to this app in this use case?

johnpapa avatar Jan 27 '17 16:01 johnpapa

There's no currently main benefit, maybe planing for you next course, Angular 2 Native: First Look :)

gilhanan avatar Jan 27 '17 16:01 gilhanan

ok ... just wanted to make sure :)

let me think about this. i dont want to confuse people with code being different than the videos if its not needed

but i appreciate the PR. ill keep it open while i consider it

johnpapa avatar Jan 27 '17 17:01 johnpapa