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) {
......

, application level module 'kibana' depends on the 'apps/discover' modules, so it can be found.