Skip to content

Commit 51967c9

Browse files
committed
docs(view): adds docs for ui-view and $view
1 parent 857c4e7 commit 51967c9

File tree

2 files changed

+38
-1
lines changed

2 files changed

+38
-1
lines changed

src/view.js

+20
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,30 @@ $ViewProvider.$inject = [];
33
function $ViewProvider() {
44

55
this.$get = $get;
6+
/**
7+
* @ngdoc object
8+
* @name ui.router.state.$view
9+
*
10+
* @requires ui.router.util.$templateFactory
11+
* @requires $rootScope
12+
*
13+
* @description
14+
*
15+
*/
616
$get.$inject = ['$rootScope', '$templateFactory'];
717
function $get( $rootScope, $templateFactory) {
818
return {
919
// $view.load('full.viewName', { template: ..., controller: ..., resolve: ..., async: false, params: ... })
20+
/**
21+
* @ngdoc function
22+
* @name ui.router.state.$view#load
23+
* @methodOf ui.router.state.$view
24+
*
25+
* @description
26+
*
27+
* @param {string} name name
28+
* @param {object} options option object.
29+
*/
1030
load: function load(name, options) {
1131
var result, defaults = {
1232
template: null, controller: null, view: null, locals: null, notify: true, async: true, params: {}

src/viewDirective.js

+18-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
1+
/**
2+
* @ngdoc directive
3+
* @name ui.router.state.diretive.ui-view
4+
*
5+
* @requires ui.router.state.$state
6+
* @requires $compile
7+
* @requires $controller
8+
* @requires $injector
9+
* @requires $anchorScroll
10+
*
11+
* @restrict ECA
12+
*
13+
* @description
14+
* The ui-view directive tells $state where to place your templates.
15+
* A view can be unnamed or named.
16+
*
17+
* @param {string} ui-view A view name.
18+
*/
219
$ViewDirective.$inject = ['$state', '$compile', '$controller', '$injector', '$anchorScroll'];
320
function $ViewDirective( $state, $compile, $controller, $injector, $anchorScroll) {
421
var $animator = $injector.has('$animator') ? $injector.get('$animator') : false;

0 commit comments

Comments
 (0)