Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created January 27, 2018 18:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthieu-D/d3fabfe729ae217c4279b3c8bd1b11a4 to your computer and use it in GitHub Desktop.
Save matthieu-D/d3fabfe729ae217c4279b3c8bd1b11a4 to your computer and use it in GitHub Desktop.
import CounterService from './counter-service';
export default {
template : `<div>
<button @click="show">
Show
</button>
<button @click="add">
Add
</button>
</div>`,
data : function () {
return {
counterService: new CounterService()
}
},
methods : {
show: function () {
this.counterService.show();
},
add: function () {
this.counterService.add();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment