eddiemf/vue-affix

Unknown custom element: <affix> - did you register the component correctly?

knyazev92 opened this issue · 3 comments

This what happens when I use affix in component.

I Installed affix via npm and use it as a vue plugin in my app:

var VueAffix = require('vue-affix');
Vue.use(VueAffix);

That shouldn't be happening. Maybe you're doing something else wrong in your code? It's hard to tell.

This usually happens when you don't require the component, but since you're using as a plugin calling Vue.use() it should be available globally to all other components you have.

Maybe you're using another vue instance? It's hard to tell without more code.

I'm getting the same error actually. I did exactly as @knyazev92 which is what the instruction says. But it says "" component not found.

@ericbae , @knyazev92 you should try use this like:
import VueAffix from 'vue-affix
Vue.use(VueAffix)