JQuery Plugins, include in Ionic 2 project

I’m not planning on using JQuery much at all in my new Ionic 2 app.

However I do need to include the Datatables JQuery plugin, as I’m looking for a consistent UI across platforms.

Datatables is available on npm, as separate js and css packages.

I don’t have any clue about how to start including the plugin in my app and then initialising the datatables, which I would normally do with $(.table).datatable();

Has anyone done this? Could give me any pointers in this 101 question…


Have you checked out angular2-datatable?

Thanks! I wasn’t aware of it, no.

Have you used it yourself? The demo looks a bit clunky but probably better than doing it myself…

No, just found it in a google search for “angular2 datatables”. If it doesn’t work out for you, it is a lot easier to use jQuery plugins with Angular2 than it was with Angular1, so that’s still an option.

OK that’s a relief. I’ll have to do some more googling and try to find an idiot’s guide.

I’ve only been using Ionic 2 for 2 weeks now and, while the internals are OK and nicely structured, I’m still at a bit of a loss on this question.