08.02.2017 Views

vuejs

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Components 65<br />

1 <br />

2 <br />

3 <br />

4 <br />

5 <br />

6 <br />

7 <br />

Displaying story component<br />

6.3 Templates<br />

There is more than one way of using a template for our component. The inline template we’ve used<br />

before can get “dirty” very fast.<br />

Another way to declare a template is to create a script tag with type set to text/template and<br />

set an id of story-template. To use this template we need to reference a selector in the template<br />

option of our component to this script.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!