Notes: All the examples below are only tested on Vue.js 1.0 (above).
Notes: The examples below use ES6 so it's recommended to use browserify or webpack to easily integrate babel.
When you need to access DOM attribute, be careful with the lifecycle. Vue.js has a few useful lifecycle hooks.
Let's say we want to scroll our component to the bottom (imagine it's a long list with overflow-y: auto
) once it's instantiate.