diff options
| author | Misko Hevery | 2011-11-03 21:14:04 -0700 |
|---|---|---|
| committer | Misko Hevery | 2011-11-14 20:31:14 -0800 |
| commit | c27aba4354c69c4a67fab587a59a8079cc9edc91 (patch) | |
| tree | 7ea9f170c197dddcfb8014fc85437523090d18a4 /docs/src/templates/docs.js | |
| parent | dd9151e522220b438074e55c72f47ed2a8da9933 (diff) | |
| download | angular.js-c27aba4354c69c4a67fab587a59a8079cc9edc91.tar.bz2 | |
refactor(api): remove type augmentation
BREAK:
- remove angular.[Object/Array/String/Function]
- in templates [].$filter(predicate) and friends need to change to [] | filter:predicate
Diffstat (limited to 'docs/src/templates/docs.js')
| -rw-r--r-- | docs/src/templates/docs.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/docs/src/templates/docs.js b/docs/src/templates/docs.js index 2693da64..0c8d787a 100644 --- a/docs/src/templates/docs.js +++ b/docs/src/templates/docs.js @@ -1,11 +1,12 @@ -DocsController.$inject = ['$location', '$window', '$cookies']; -function DocsController($location, $window, $cookies) { +DocsController.$inject = ['$location', '$window', '$cookies', '$filter']; +function DocsController($location, $window, $cookies, $filter) { window.$root = this.$root; var scope = this, OFFLINE_COOKIE_NAME = 'ng-offline', DOCS_PATH = /^\/(api)|(guide)|(cookbook)|(misc)|(tutorial)/, - INDEX_PATH = /^(\/|\/index[^\.]*.html)$/; + INDEX_PATH = /^(\/|\/index[^\.]*.html)$/, + filter = $filter('filter'); scope.$location = $location; scope.versionNumber = angular.version.full; @@ -25,7 +26,7 @@ function DocsController($location, $window, $cookies) { var parts = path.split('/'); scope.sectionId = parts[1]; scope.partialId = parts[2] || 'index'; - scope.pages = angular.Array.filter(NG_PAGES, {section: scope.sectionId}); + scope.pages = filter(NG_PAGES, {section: scope.sectionId}); var i = scope.pages.length; while (i--) { |
