次のplunkrがあります(以下のコード)
angular でテンプレートを切り替えています。各テンプレートには、プロジェクトprogressbar
からのディレクティブがあります。angular-ui
最初のテンプレートには属性'animate=false'
があり、残りのテンプレートには animate=true があります。
テンプレートを意図的に変更して、テンプレートが互いに異なるようにしました。1つは空白、他はラッピングdivなどです...
ただし、animate 属性値の変更は無視されます。すべてのディレクティブは を使用しますfalse
。
ディレクティブの実装を変更できません。
- 最後の 2 つのテンプレートで進行状況の変化をアニメーション化するにはどうすればよいですか
ここに私が生成したテンプレートがあります
angular.module("myProgressBarApp").run(["$templateCache", function($templateCache) {
$templateCache.put("first.html",
'<div>hello world</div><div><progressbar animate="false" value="progressPercentage" id="mograbi" class="progressbar"> <b>{{progressPercentage}}%</b></progressbar></div>');
$templateCache.put("second.html",
'<progressbar animate="true" id="guy" value="progressPercentage" type="primary" class="progressbar"> <b>{{progressPercentage}}%</b></progressbar>');
$templateCache.put("third.html",
'this is third');
$templateCache.put("fourth.html",
'<progressbar animate="true" id="guy3" value="progressPercentage" type="primary" class="progressbar"> <b>{{progressPercentage}}%</b></progressbar>');
$templateCache.put("fifth.html",
'<progressbar animate="true" id="guy4" value="progressPercentage" type="primary" class="progressbar"> <b>{{progressPercentage}}%</b></progressbar>');
}
]);