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 --- src/ngResource/resource.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/ngResource') diff --git a/src/ngResource/resource.js b/src/ngResource/resource.js index abb2bc56..827886a3 100644 --- a/src/ngResource/resource.js +++ b/src/ngResource/resource.js @@ -34,9 +34,9 @@ * `http://example.com:8080/api`), you'll need to escape the colon character before the port * number, like this: `$resource('http://example.com\\:8080/api')`. * - * If you are using a url with a suffix, just add the suffix, like this: + * If you are using a url with a suffix, just add the suffix, like this: * `$resource('http://example.com/resource.json')` or `$resource('http://example.com/:id.json') - * or even `$resource('http://example.com/resource/:resource_id.:format')` + * or even `$resource('http://example.com/resource/:resource_id.:format')` * If the parameter before the suffix is empty, :resource_id in this case, then the `/.` will be * collapsed down to a single `.`. If you need this sequence to appear and not collapse then you * can escape it with `/\.`. @@ -146,7 +146,7 @@ * * On success, the promise is resolved with the same resource instance or collection object, * updated with data from server. This makes it easy to use in - * {@link ng.$routeProvider resolve section of $routeProvider.when()} to defer view rendering + * {@link ngRoute.$routeProvider resolve section of $routeProvider.when()} to defer view rendering * until the resource(s) are loaded. * * On failure, the promise is resolved with the {@link ng.$http http response} object, @@ -376,7 +376,7 @@ angular.module('ngResource', ['ng']). url = url.replace(/\/\.(?=\w+($|\?))/, '.'); // replace escaped `/\.` with `/.` config.url = url.replace(/\/\\\./, '/.'); - + // set params - delegate param encoding to $http forEach(params, function(value, key){ -- cgit v1.2.3