# Use javascript plugin/widget and/or angular2 plugin

**URL:** <https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596>\
**Category:** ionic-v3\
**Created:** [March 2, 2017, 4:25pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596 "2017-03-02T16:25:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![gonzalo\_itecnis](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gonzalo_itecnis/32/107374_2.png) [@gonzalo\_itecnis](https://forum.ionicframework.com/u/gonzalo_itecnis)\
**Post date:** [March 2, 2017, 4:25pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/1 "2017-03-02T16:25:12Z")

</div>

Hi,

1. 

I want to use a javascript widget, or a plugin.  
For example, a slider:

In normal HTML/js I will include in my html this two lines (for example, a jquery slider):

How do I achieve this in ionic 2 / angular 2.

1. In my case, I want to use datatables  
I found this  
[https://www.npmjs.com/package/angular2-datatable](https://www.npmjs.com/package/angular2-datatable)

Is it possible, and how to do it, to use angular 2 plugins

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 2, 2017, 4:44pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/2 "2017-03-02T16:44:17Z")

</div>

There’s literally exact step by step instructions on how to install and use it in the link you posted…so…not really sure what you want from us…

---

<div class="post-metadata">

**Author:** ![gonzalo\_itecnis](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gonzalo_itecnis/32/107374_2.png) [@gonzalo\_itecnis](https://forum.ionicframework.com/u/gonzalo_itecnis)\
**Post date:** [March 2, 2017, 7:27pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/3 "2017-03-02T19:27:34Z")

</div>

About question one. I want to know how to use javascript libraries, as I explained.

And question two, the link explain it for angular. So simply would be as question one, but with angular instead of javascript.

My 2nd question could be _rephrased_ as:  
Is it the same to _talk_ about about angular 2 and ionic 2?  
If I follow steps in the link, nothing will fail in a ionic project?

---

<div class="post-metadata">

**Author:** ![rlouie](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rlouie/32/134973_2.png) [@rlouie](https://forum.ionicframework.com/u/rlouie)\
**Post date:** [March 2, 2017, 7:31pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/4 "2017-03-02T19:31:39Z")

</div>

Ah, okay, yes, rephrasing it helped. For the most part yes, you can talk about them as if they were the same. Ionic 2 _uses_ Angular 2, and provides extra styles and components to make mobile app development easier.

There are some special cases where Ionic 2 differes, like it doesn’t user the Angular router, it uses it’s own Navigation Controller, but those details aside they are one in the same.

---

<div class="post-metadata">

**Author:** ![gonzalo\_itecnis](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gonzalo_itecnis/32/107374_2.png) [@gonzalo\_itecnis](https://forum.ionicframework.com/u/gonzalo_itecnis)\
**Post date:** [March 2, 2017, 7:43pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/5 "2017-03-02T19:43:10Z")

</div>

Ok, thanks!.

So question 1 is left =)

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 2, 2017, 11:36pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/6 "2017-03-02T23:36:27Z")

</div>

The term “widget” is so overloaded that it’s become pretty meaningless. Yes you can use JavaScript libraries in Ionic applications. Yes you can even use jQuery, although most every time I’ve seen somebody talking about wanting to use this or that jQuery thingy, an Angular alternative exists, and that should always be your preferred strategy. Read [this](https://ionicframework.com/docs/v2/resources/third-party-libs/).

---

<div class="post-metadata">

**Author:** ![gonzalo\_itecnis](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gonzalo_itecnis/32/107374_2.png) [@gonzalo\_itecnis](https://forum.ionicframework.com/u/gonzalo_itecnis)\
**Post date:** [March 3, 2017, 5:03pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/7 "2017-03-03T17:03:45Z")

</div>

Thank you @rapropos Useful link.

But… Do I have to choose a plugin/package that is available here, is that right?:  
[https://www.npmjs.com/search](https://www.npmjs.com/search)

I have realized that the following two lines in my first question did not show up

```
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="jquery.slides.min.js"></script>

```

So for example, this one I have mentiones.  
I have to look it up in npm, and if it’s not there, i can’t use it ?

If not, can someone make or put here a comprehensive tutorial?

I leave thi link also, for other readers:  
[https://x-team.com/blog/include-javascript-libraries-in-an-ionic-2-typescript-project/](https://x-team.com/blog/include-javascript-libraries-in-an-ionic-2-typescript-project/)

---

<div class="post-metadata">

**Author:** ![rapropos](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/rapropos/32/100227_2.png) [@rapropos](https://forum.ionicframework.com/u/rapropos)\
**Post date:** [March 3, 2017, 7:19pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/8 "2017-03-03T19:19:10Z")

</div>

[Ionic has a Slides component](http://ionicframework.com/docs/v2/api/components/slides/Slides/).

---

<div class="post-metadata">

**Author:** ![gonzalo\_itecnis](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/gonzalo_itecnis/32/107374_2.png) [@gonzalo\_itecnis](https://forum.ionicframework.com/u/gonzalo_itecnis)\
**Post date:** [March 3, 2017, 8:20pm UTC](https://forum.ionicframework.com/t/use-javascript-plugin-widget-and-or-angular2-plugin/81596/9 "2017-03-03T20:20:41Z")

</div>

Yes I know.

I put slider as an example. But what if I want another slider?

Or a component that is not present in ionic (I do not have an example right now)
