added umbLoadIndicator documentation - first draft

This commit is contained in:
Mads Rasmussen
2015-12-28 14:22:57 +01:00
committed by Rune Strand
parent 9e75ffb332
commit fe004db7d5

View File

@@ -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';