我在爲Angularjs中的特定功能查找文檔時遇到了問題。在angularJS中,如何查找myApp.value()的文檔?
當我閱讀Filter文檔,存在使用.value的一個片段()
angular.module('myStatefulFilterApp', [])
.filter('decorate', ['decoration', function(decoration) {
function decorateFilter(input) {
return decoration.symbol + input + decoration.symbol;
}
decorateFilter.$stateful = true;
return decorateFilter;
}])
.controller('MyController', ['$scope', 'decoration', function($scope, decoration) {
$scope.greeting = 'hello';
$scope.decoration = decoration;
}])
.value('decoration', {symbol: '*'}); // this value()
你能幫我找到這個.value的()上https://docs.angularjs.org文件?
我可以看到.value與.controller,.directive,.filter等級相同,所以它應該附加到angular.Module對象,但這裏是doc for angular.Module。我找不到任何東西。 Myabe我做了錯誤的假設,或者沒有完全理解Angularjs領域的慣例。
我想知道如何在https://docs.angularjs.org上找到.value()。謝謝!
我不確定我是否理解這個問題。 'value(name,object);'的文檔*絕對*在您鏈接的頁面https://docs.angularjs.org/api/ng/type/angular.Module上。 – Claies
@克萊斯抱歉,我沒有看到它。謝謝你讓我知道。 –