aboutsummaryrefslogtreecommitdiffstats
path: root/src/services.js
diff options
context:
space:
mode:
authorMisko Hevery2010-08-18 16:23:12 -0700
committerMisko Hevery2010-08-18 17:26:33 -0700
commit5ddd8d958686c5075b6c58b700f19b4bdea90e1d (patch)
treef43da0153fb41244425c00fc728a17028671ce03 /src/services.js
parent1087270c95f6bbafd3715c9a5eecdafac79c9daa (diff)
downloadangular.js-5ddd8d958686c5075b6c58b700f19b4bdea90e1d.tar.bz2
stringify names for better compression, remove dead functions, removed underscore.js compatibility
Diffstat (limited to 'src/services.js')
-rw-r--r--src/services.js22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/services.js b/src/services.js
index a5158149..19375f39 100644
--- a/src/services.js
+++ b/src/services.js
@@ -40,7 +40,7 @@ angularService("$location", function(browser){
}
function check(param) {
- return lastLocation[param] == location[param] ? undefined : location[param];
+ return lastLocation[param] == location[param] ? _undefined : location[param];
}
function checkProtocol(){
@@ -49,9 +49,9 @@ angularService("$location", function(browser){
lastLocation.port === location.port &&
lastLocation.path === location.path &&
equals(lastLocation.search, location.search))
- return undefined;
+ return _undefined;
var url = toKeyValue(location.search);
- var port = (location.port == DEFAULT_PORTS[location.protocol] ? null : location.port);
+ var port = (location.port == DEFAULT_PORTS[location.protocol] ? _null : location.port);
return location.protocol + '://' + location.host +
(port ? ':' + port : '') + location.path +
(url ? '?' + url : '');
@@ -60,7 +60,7 @@ angularService("$location", function(browser){
function checkHashPathSearch(){
if (lastLocation.hashPath === location.hashPath &&
equals(lastLocation.hashSearch, location.hashSearch) )
- return undefined;
+ return _undefined;
var url = toKeyValue(location.hashSearch);
return escape(location.hashPath) + (url ? '?' + url : '');
}
@@ -72,7 +72,7 @@ angularService("$location", function(browser){
location.href = url.replace('#$', '');
location.protocol = match[1];
location.host = match[3] || '';
- location.port = match[5] || DEFAULT_PORTS[location.protocol] || null;
+ location.port = match[5] || DEFAULT_PORTS[location.protocol] || _null;
location.path = match[6];
location.search = parseKeyValue(match[8]);
location.hash = match[10] || '';
@@ -149,7 +149,7 @@ angularService("$hover", function(browser, document) {
}
} else if (tooltip) {
tooltip.callout.remove();
- tooltip = null;
+ tooltip = _null;
}
});
}, {inject:['$browser', '$document']});
@@ -211,7 +211,7 @@ function switchRouteMatcher(on, when, dstName) {
});
if (dstName) this.$set(dstName, dst);
}
- return match ? dst : null;
+ return match ? dst : _null;
}
angularService('$route', function(location){
@@ -234,7 +234,7 @@ angularService('$route', function(location){
};
function updateRoute(){
var childScope;
- $route.current = null;
+ $route.current = _null;
angular.foreach(routes, function(routeParams, route) {
if (!childScope) {
var pathParams = matcher(location.hashPath, route);
@@ -262,7 +262,7 @@ angularService('$xhr', function($browser, $error, $log){
return function(method, url, post, callback){
if (isFunction(post)) {
callback = post;
- post = null;
+ post = _null;
}
if (post && isObject(post)) {
post = toJson(post);
@@ -300,7 +300,7 @@ angularService('$xhr.bulk', function($xhr, $error, $log){
function bulkXHR(method, url, post, callback) {
if (isFunction(post)) {
callback = post;
- post = null;
+ post = _null;
}
var currentQueue;
foreach(bulkXHR.urls, function(queue){
@@ -349,7 +349,7 @@ angularService('$xhr.cache', function($xhr){
function cache(method, url, post, callback, verifyCache){
if (isFunction(post)) {
callback = post;
- post = null;
+ post = _null;
}
if (method == 'GET') {
var data;