From 5599b55b04788c2e327d7551a4a699d75516dd21 Mon Sep 17 00:00:00 2001
From: Igor Minar
Date: Wed, 5 Jun 2013 15:30:31 -0700
Subject: refactor($route): pull $route and friends into angular-route.js
$route, $routeParams and ngView have been pulled from core angular.js
to angular-route.js/ngRoute module.
This is was done to in order keep the core focused on most commonly
used functionality and allow community routers to be freely used
instead of $route service.
There is no need to panic, angular-route will keep on being supported
by the angular team.
Note: I'm intentionally not fixing tutorial links. Tutorial will need
bigger changes and those should be done when we update tutorial to
1.2.
BREAKING CHANGE: applications that use $route will now need to load
angular-route.js file and define dependency on ngRoute module.
Before:
```
...
...
var myApp = angular.module('myApp', ['someOtherModule']);
...
```
After:
```
...
...
var myApp = angular.module('myApp', ['ngRoute', 'someOtherModule']);
...
```
Closes #2804
---
docs/src/templates/index.html | 1 +
docs/src/templates/js/docs.js | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
(limited to 'docs/src')
diff --git a/docs/src/templates/index.html b/docs/src/templates/index.html
index da75cff6..83b02596 100644
--- a/docs/src/templates/index.html
+++ b/docs/src/templates/index.html
@@ -38,6 +38,7 @@
if (jQuery) addTag('script', {src: debug ? 'js/jquery.js' : 'js/jquery.min.js'});
addTag('script', {src: path('angular.js')}, sync);
addTag('script', {src: path('angular-resource.js') }, sync);
+ addTag('script', {src: path('angular-route.js') }, sync);
addTag('script', {src: path('angular-cookies.js') }, sync);
addTag('script', {src: path('angular-sanitize.js') }, sync);
addTag('script', {src: path('angular-mobile.js') }, sync);
diff --git a/docs/src/templates/js/docs.js b/docs/src/templates/js/docs.js
index 7cd3c9c6..2350e698 100644
--- a/docs/src/templates/js/docs.js
+++ b/docs/src/templates/js/docs.js
@@ -679,7 +679,7 @@ docsApp.controller.DocsController = function($scope, $location, $window, $cookie
};
-angular.module('docsApp', ['ngResource', 'ngCookies', 'ngSanitize', 'bootstrap', 'bootstrapPrettify']).
+angular.module('docsApp', ['ngResource', 'ngRoute', 'ngCookies', 'ngSanitize', 'bootstrap', 'bootstrapPrettify']).
config(function($locationProvider) {
$locationProvider.html5Mode(true).hashPrefix('!');
}).
--
cgit v1.2.3