Vue.js: Using dynamic and static attributes and props with components and HTML elements (video)

I wrote a book about Vue.js! Vue.js 2.x by Example is available as from Packt and covers Vue, Vuex and VueRouter.

This Vue.js tutorial explains the difference between dynamic and static attributes and props. It shows how you can pass variables to components or other HTML elements to display dynamic contents.

Using a colon, or v-bind, you tell Vue that the contents of the attribute, or prop, is dynamic. This means it can be a variable, a javascript expression or function. If you wish to pass in a simple string, you don't need to bind or use the colon.

This carries on from Using props for accessing URL parameters within components with Vue Router

View this post on Github

You might also enjoy…

Mike Street

Written by Mike Street

Mike is a CTO and Lead Developer from Brighton, UK. He spends his time writing, cycling and coding. You can find Mike on Mastodon.