0
之前我安装我的路由器我设立了一个全球性的Vue的实例,并使用VUE资源是这样的:如何将vue-resource与vue-router实例一起使用?
export const befriend = (recipient, event) => {
Vue.http.post('/route',{
// Data
}).then(function(response) {
// Success
}.bind(this), function(response) {
// Error
});
}
现在我的Vue的实例是由路由器本身这样的实例:
router.start(App, 'body');
当我没有绑定到我的实例的变量时,如何使用vue-resource?