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 --- Gruntfile.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'Gruntfile.js') diff --git a/Gruntfile.js b/Gruntfile.js index 5339b1bb..fd37e1f1 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -104,13 +104,22 @@ module.exports = function(grunt) { src: util.wrap([ 'src/ngSanitize/sanitize.js', 'src/ngSanitize/directive/ngBindHtml.js', - 'src/ngSanitize/filter/linky.js', + 'src/ngSanitize/filter/linky.js' ], 'module') }, resource: { dest: 'build/angular-resource.js', src: util.wrap(['src/ngResource/resource.js'], 'module') }, + route: { + dest: 'build/angular-route.js', + src: util.wrap([ + 'src/ngRoute/routeUtils.js', + 'src/ngRoute/route.js', + 'src/ngRoute/routeParams.js', + 'src/ngRoute/directive/ngView.js' + ], 'module') + }, cookies: { dest: 'build/angular-cookies.js', src: util.wrap(['src/ngCookies/cookies.js'], 'module') @@ -136,6 +145,7 @@ module.exports = function(grunt) { loader: 'build/angular-loader.js', mobile: 'build/angular-mobile.js', resource: 'build/angular-resource.js', + route: 'build/angular-route.js', sanitize: 'build/angular-sanitize.js', bootstrap: 'build/docs/components/angular-bootstrap.js', bootstrapPrettify: 'build/docs/components/angular-bootstrap-prettify.js', -- cgit v1.2.3