Khandaker Toihidul Islam
Software Engineer
Backend : PHP | Mysql | Symfony | CakePhp | Wordpress | Drupal
Frontend : Node js | Vue js | React Js | Javascript | HTML | CSS | Bootstrap
Tools , Server : Nginx | Apache | Git | Jenkins | Jira | Asana | Silenium | Spira

Vue write javascript in template

	<div id="app">
		<button v-on:click="Count(1)">Increment by 1 </button>
		<button v-on:click="count +=2">Increment by 2</button>
		<p>Count : {{ count}}</p>
		<p>Even / odd : {{ count % 2 == 0 ? 'Even' : 'odd' }}</p>
		<p>Count * 3 :  {{ count * 3}} </p>

	</div>

Demo http://vue.toihid.com/section-2/js_in_template.php

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *