matiastucci/vue-input-tag

[Vue warn]: Unknown custom element: <input-tag>

debiprasad opened this issue · 2 comments

Version of Vue I'm using: 2.5.10

Version of vue-input-tag I'm using: 0.0.16

Usage:

import InputTag from 'vue-input-tag';

Vue.component('food-tracker', {
...
});
<input-tag :on-change="updateDailyMeals" :tags="breakfastMealItems" placeholder="Add food or drinks"></input-tag>

I am getting the following error:

[Vue warn]: Unknown custom element: <input-tag> - did you register the component correctly? For recursive components, make sure to provide the "name" option.

found in

---> <FoodTracker>
       <Tracking>
         <Root>

Is there something where I am doing wrong?

I think that you are missing the component declaration (for the InputTag), in the parent component. If you want to use it locally you also need to add this to your food-tracker component:

Vue.component('food-tracker', {
  components: { InputTag }
});

Yes, I had missed that.