mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
[ui/modules/docs] moved recommendations to the styleguide
This commit is contained in:
parent
ed3feea1a5
commit
9f2e32e5e1
2 changed files with 3 additions and 6 deletions
|
@ -825,7 +825,7 @@ Angular modules are defined using a custom require module named `ui/modules`. It
|
|||
var app = require('ui/modules').get('app/namespace');
|
||||
```
|
||||
|
||||
`app` above is a reference to an Angular module, and can be used to define controllers, providers and anything else used in Angular.
|
||||
`app` above is a reference to an Angular module, and can be used to define controllers, providers and anything else used in Angular. While you can use this module to create/get any module with ui/modules, we generally use the "kibana" module for everything.
|
||||
|
||||
### Private modules
|
||||
|
||||
|
@ -838,6 +838,8 @@ app.controller('myController', function($scope, otherDeps, Private) {
|
|||
});
|
||||
```
|
||||
|
||||
*Use `Private` modules for everything except directives, filters, and controllers.*
|
||||
|
||||
### Promises
|
||||
|
||||
A more robust version of Angular's `$q` service is available as `Promise`. It can be used in the same way as `$q`, but it comes packaged with several utility methods that provide many of the same useful utilities as Bluebird.
|
||||
|
|
|
@ -19,11 +19,6 @@
|
|||
* Private modules are able to find any dependency, since they are injected using the
|
||||
* "kibana" module's injector.
|
||||
*
|
||||
* RECOMMENDATIONS:
|
||||
* - just use the "kibana" module for everything
|
||||
* - rely on js modules for modularity
|
||||
* - use Private modules for everything except directives and filters
|
||||
*
|
||||
*/
|
||||
define(function (require) {
|
||||
var angular = require('angular');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue