added umbLoadIndicator documentation - first draft
This commit is contained in:
committed by
Rune Strand
parent
9e75ffb332
commit
fe004db7d5
@@ -1,3 +1,50 @@
|
||||
/**
|
||||
@ngdoc directive
|
||||
@name umbraco.directives.directive:umbLoadIndicator
|
||||
@restrict E
|
||||
|
||||
@description
|
||||
Use this directive to generate a loading indicator.
|
||||
|
||||
<h3>Markup example</h3>
|
||||
<pre>
|
||||
<div ng-controller="Umbraco.Controller as vm">
|
||||
|
||||
<umb-load-indicator
|
||||
ng-if="vm.loading">
|
||||
</umb-load-indicator>
|
||||
|
||||
<div class="content" ng-if="!vm.loading">
|
||||
<p>{{content}}</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</pre>
|
||||
|
||||
<h3>Controller example</h3>
|
||||
<pre>
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function Controller(myService) {
|
||||
|
||||
var vm = this;
|
||||
|
||||
vm.content = "";
|
||||
vm.loading = true;
|
||||
|
||||
myService.getContent().then(function(content){
|
||||
vm.content = content;
|
||||
vm.loading = false;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Controller", Controller);
|
||||
})();
|
||||
</pre>
|
||||
**/
|
||||
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user