Components with inline templates in Vue.js

1 · Amit Merchant · May 13, 2020, midnight
Vue.js has this handy feature where you can set the inline-template special attribute on the component and now the component can use its inner content as its template, rather than treating it as distributed content. So, for instance, let’s say I have this component called sidebar, I can attach the inline-template attribute to it like so. <sidebar inline-template> <ul> <li>{{ elementAbout }}</li> <li>{{ elementContact }}</li> <li>{{ elementTheme }}</li> </ul> </sid...