angular-first-look-examples
angular-first-look-examples copied to clipboard
Storyline-Tracker: refactor toast to use Renderer
Refactoring toast component to using Angular Renderer service. Additional, removed toast scroll which I didn't sure for what that meaning.
thanks for the PR.
can you explain the pros and cons of this move for this use case?
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
I am aware of the Renderer service. But why do you feel this is a benefit to this app in this use case?
There's no currently main benefit, maybe planing for you next course, Angular 2 Native: First Look :)
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