<div id="app" data-id="123"></div>
new Vue({
el: '#app',
data: {
id: null
},
mounted: function() {
this.id = this.$el.getAttribute('data-id');
}
});
Subscribe to:
Post Comments (Atom)
-
Implementing the Repository Pattern with CakePHP I must admit, my recent articles are becoming a bit obsessed around the repository pat...
-
Organization : Keeping each site's configuration in separate files makes the server easier to manage, especially when hosting multiple...
-
What is a closure? A closure is an inner function that has access to the outer (enclosing) function’s variables—scope chain. The closure h...
No comments:
Post a Comment