Files
DefinitelyTyped/vue/vue-tests.ts
T
2015-08-08 12:59:50 +09:00

34 lines
725 B
TypeScript

/// <reference path="vue.d.ts" />
module myapp {
"use strict";
export class Application extends Vue {
constructor() {
super();
Vue.config.debug = true;
this._init({
// data is necessary to always write in init()
data: {
text: "hello world."
// },
// methods : {
// action : this.action
/* same as unser */
}
});
this.methods = {
action: this.action
};
}
action(): void {
console.log("action");
}
}
}
var app = new myapp.Application();
app.$mount("#main");
var AppConstructor = Vue.extend({});
var extendedApp = new AppConstructor();
app.$mount("#main");