# Inject ngSanatize in Kibana app

**URL:** <https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846>\
**Category:** Kibana\
**Created:** [May 24, 2016, 1:24pm UTC](https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846 "2016-05-24T13:24:56Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martijn\_Vaandering](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_vaandering/32/9915_2.png) [@Martijn\_Vaandering](https://discuss.elastic.co/u/Martijn_Vaandering)\
**Post date:** [May 24, 2016, 1:24pm UTC](https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846/1 "2016-05-24T13:24:56Z")

</div>

Hi to all the happy programmers out there,

i'm writing a plugin app for Kibana and all is functioning **suberb**!

But now i want to inject ngSanatize into the app but where to configure that...  
Any help is very welcome!

Tnx in advance

Martijn

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [May 24, 2016, 10:07pm UTC](https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846/2 "2016-05-24T22:07:10Z")

</div>

First, run `npm install angular-sanitize` to install the node package into your project and update the `package.json`.

Then you would inject `'ngSanitize'` into your module. The place to inject dependencies is where `uiModules.get()` is called. If you are using the plugin generator, then that would be here: [https://github.com/elastic/generator-kibana-plugin/blob/master/src/generators/app/templates/public/app.js#L28](https://github.com/elastic/generator-kibana-plugin/blob/master/src/generators/app/templates/public/app.js#L28)

The app.js in your project would look like:

```auto
// top of the file
import 'angular-sanitize';

// further down
uiModules
.get('app/myplugin', ['ngSanitize'])
.controller(...)

```

Note that I haven't tested this, but that should help get you started.

---

<div class="post-metadata">

**Author:** ![Martijn\_Vaandering](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/martijn_vaandering/32/9915_2.png) [@Martijn\_Vaandering](https://discuss.elastic.co/u/Martijn_Vaandering)\
**Post date:** [May 25, 2016, 6:35am UTC](https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846/3 "2016-05-25T06:35:07Z")

</div>

Thank you **very**  **much** for your fast reaction Tim!

_It looks like i need to setup a nice Linux machine 'cause yeoman on Windows is such a pain in the butt._

Martijn

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:52pm UTC](https://discuss.elastic.co/t/inject-ngsanatize-in-kibana-app/50846/4 "2017-07-06T13:52:22Z")

</div>


