Question

How can I include jQuery TokenInput with the Meteor framework? I couldn't find a smart package so now I am wondering how I can do it without needing a smart package.

For example how to include the jquery.tokeninput.js?

As for coming up with a script that returns search results would I just use iron-router for that?

And have a route that accepts a query string q, then do a simple MyCollections.find({name: q} ....?

If would be great if someone could help me understand exactly how I can add this plugin to my app that's on Meteor's framework.

Was it helpful?

Solution

A possible way of doing this without the need of packaging is to put it in your client/lib/ folder.

In this case it would be root_of_your_app/client/lib/jquery.tokeninput.js, you can also put .css files in there.

I still think you should make a smart package out of it, but this should work.

In terms of building the script, I think you're on the right track.

Make sure you use .fetch() to return the results in an array, and then possibly use JSON.stringify(array) to get the right format.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top