1
我在我的AngularJS应用程序中使用Material Design,我想在加载页面时添加进度栏。如何在AngularJS MD中使用<md-progress-linear>?
MD使用md-progress-*指令获得加载条:
<md-progress-linear md-mode="determinate" value="..."></md-progress-linear>
在我的应用我试图让$viewContentLoaded
加载进度完成:
HTML:
<html ng-app="app">
<body ng-controller="AppCtrl">
<md-progress-circular ng-if="determinateValue === 100" md-mode="determinate" value="{{determinateValue}}"></md-progress-circular>
...
</body>
</html>
JS:
'use strict';
angular.module('app', ['ngMaterial', 'ngAnimate'])
.controller('AppCtrl', function ($scope) {
$scope.determinateValue = 0;
$scope.$on('$viewContentLoaded', function(){
$scope.determinateValue = 100;
});
});
但它不起作用,我没有得到任何错误。
ps。 <md-progress-linear>
标签将从DOM中消失。