David-Desmaisons / Vue.Isotope

:iphone: Vue component for isotope filter & sort magical layouts
MIT License
345 stars 48 forks source link

[Vue warn]: Unknown custom element: <isotope> ? #56

Closed SadRebel1000 closed 6 years ago

SadRebel1000 commented 6 years ago

Hello,

I'm just taking some first steps using Javascript, Vue and Isotope. I've tried hours to make a copy of the js.fiddle vue-istope-chemistry-example to work offline (main.js + main.html +main.css), but I can't get it work and get the same problem as in the closed issue #28

var Vue = require('vue');
var lodash = require('lodash');
var Isotope = require('vueisotope');

var count = 0;

var vm = new Vue({  el: "#main",
  data: {
    layouts: [
...

I use npm and browserify to build a bundle.js which I load in the main.html file. When I load the website, the web console tells me the same warning as in the closed issue #28 . Some of the things are there but it doesn't work and has no layout. I read the readme file and checked on the isotope website and tried to fulfil the recommendations as requested but clearly I don't quite understand. I also tried installing and requiring jQuery and jQueryBridget but nothing works...

Please, let me know if you need any other information from me to help. I understand that I'm asking a bit of hazy question...

David-Desmaisons commented 6 years ago

Add: components: { isotope, }

SadRebel1000 commented 6 years ago

I made a previous comment that it didn't work. But it does work. I wasn't aware at first that I should've added it into the vm variable instead of just bare into the JS. Thank so much!