mirror of
https://github.com/aspnet/JavaScriptServices.git
synced 2025-12-24 02:30:13 +00:00
Add Vue template
This commit is contained in:
11
templates/VueSpa/ClientApp/components/counter/counter.ts
Normal file
11
templates/VueSpa/ClientApp/components/counter/counter.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import Vue from 'vue';
|
||||
import { Component } from 'av-ts';
|
||||
|
||||
@Component
|
||||
export default class CounterComponent extends Vue {
|
||||
currentcount: number = 0;
|
||||
|
||||
incrementCounter() {
|
||||
this.currentcount++;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>Counter</h1>
|
||||
|
||||
<p>This is a simple example of a Vue.js component.</p>
|
||||
|
||||
<p>Current count: <strong>{{ currentcount }}</strong></p>
|
||||
|
||||
<button @click="incrementCounter">Increment</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="./counter.ts"></script>
|
||||
Reference in New Issue
Block a user