Skip to content
This repository was archived by the owner on Sep 6, 2020. It is now read-only.
This repository was archived by the owner on Sep 6, 2020. It is now read-only.

TypeError: Vue.set is not a function #22

@sne11ius

Description

@sne11ius

I created a new project with vue-cli, added vue-model dependency and want to try it out.

I have this:

import Vue from 'vue'
import VueModel from 'vue-model'

Vue.use(VueModel, {
  WatchEntry: {
    attributes: [
      'id',
      'url'
    ],
    http: {
      baseRoute: '/my/watches'
    }
  }
})

Now I want to load all models from the server:

methods: {
    loadData () {
      console.debug(this.$model('WatchEntry').index())
    }
  }

And I get:

TypeError: Vue.set is not a function
    at Errors.set (Errors.js?4eb3:23)
    at new Errors (Errors.js?4eb3:7)
    at Model.setData (Model.js?6d83:32)
    at new Model (Model.js?6d83:12)
    at VueModel.$model (VueModel.js?f341:38)
    at apply (lodash.js?3387:496)
    at wrapper (lodash.js?3387:5356)
    at VueComponent.eval [as $model] (VueModel.js?f341:171)
    at VueComponent.loadData (HelloWorld.vue?b703:39)
    at Proxy.boundFn (vue.esm.js?efeb:187)

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions