# How kibana ui modules work?

**URL:** <https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042>\
**Category:** Kibana\
**Created:** [December 14, 2016, 3:55pm UTC](https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042 "2016-12-14T15:55:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![zhengjie](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@zhengjie](https://discuss.elastic.co/u/zhengjie)\
**Post date:** [December 14, 2016, 3:55pm UTC](https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042/1 "2016-12-14T15:55:18Z")

</div>

Hi, I read some kibana 4.3 source code. I think 'discover' controller is in 'apps/discover' module, how 'ui/routes' find it? which seems in 'kibana' module. thanks!

```
var app = require('ui/modules').get('apps/discover', [
    'kibana/notify',
    'kibana/courier',
    'kibana/index_patterns'
]);

require('ui/routes')
  .when('/discover/:id?', {
    template: require('plugins/kibana/discover/index.html'),
......

app.controller('discover', function ($scope, config, courier, $route, $window, Notifier,
AppState, timefilter, Promise, Private, kbnUrl, highlightTags) {
......
```

---

<div class="post-metadata">

**Author:** ![weltenwort](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/weltenwort/32/53885_2.png) [@weltenwort](https://discuss.elastic.co/u/weltenwort)\
**Post date:** [December 14, 2016, 4:24pm UTC](https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042/2 "2016-12-14T16:24:15Z")

</div>

Hi @zhengjie,

I am not sure I understand your question correctly. If you are looking to get into writing your own Kibana plugin, I would recommend to take a look at [this introductory talk](https://www.elastic.co/elasticon/conf/2016/sf/how-to-build-your-own-kibana-plugins).

---

<div class="post-metadata">

**Author:** ![zhengjie](https://avatars.discourse-cdn.com/v4/letter/z/71e660/32.png) [@zhengjie](https://discuss.elastic.co/u/zhengjie)\
**Post date:** [December 14, 2016, 5:04pm UTC](https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042/3 "2016-12-14T17:04:15Z")

</div>

@weltenwort  
Think you, but I know how to write simple Kibana plugin.  
I thought for a day, and I find it now.😓

turned out that it's about Angular 😂 , application level module 'kibana' depends on the 'apps/discover' modules, so it can be found.

---

<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:** [January 11, 2017, 5:04pm UTC](https://discuss.elastic.co/t/how-kibana-ui-modules-work/69042/4 "2017-01-11T17:04:21Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
