aboutsummaryrefslogtreecommitdiffstats
path: root/src/ng/location.js
diff options
context:
space:
mode:
authorKen Sheedlo2013-06-07 18:24:30 -0700
committerIgor Minar2013-06-17 13:29:30 -0700
commit003861d2fdb37b83e1d0939d49b70fbc67766997 (patch)
treedc53ff724097cc7485093bb43c2f3aa5f4377cb2 /src/ng/location.js
parent908071afbf32c46fe9110e4a67e104bbd4b3a56b (diff)
downloadangular.js-003861d2fdb37b83e1d0939d49b70fbc67766997.tar.bz2
chore(minErr): replace ngError with minErr
Diffstat (limited to 'src/ng/location.js')
-rw-r--r--src/ng/location.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ng/location.js b/src/ng/location.js
index 7b011abe..de629d42 100644
--- a/src/ng/location.js
+++ b/src/ng/location.js
@@ -3,6 +3,7 @@
var SERVER_MATCH = /^([^:]+):\/\/(\w+:{0,1}\w*@)?(\{?[\w\.-]*\}?)(:([0-9]+))?(\/[^\?#]*)?(\?([^#]*))?(#(.*))?$/,
PATH_MATCH = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/,
DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp': 21};
+var $locationMinErr = minErr('$location');
/**
@@ -95,7 +96,7 @@ function LocationHtml5Url(appBase, basePrefix) {
matchUrl(url, parsed);
var pathUrl = beginsWith(appBaseNoFile, url);
if (!isString(pathUrl)) {
- throw ngError(21, '$location error! Invalid url "{0}", missing path prefix "{1}".', url, appBaseNoFile);
+ throw $locationMinErr('nopp', 'Invalid url "{0}", missing path prefix "{1}".', url, appBaseNoFile);
}
matchAppUrl(pathUrl, parsed);
extend(this, parsed);
@@ -157,11 +158,11 @@ function LocationHashbangUrl(appBase, hashPrefix) {
matchUrl(url, this);
var withoutBaseUrl = beginsWith(appBase, url) || beginsWith(appBaseNoFile, url);
if (!isString(withoutBaseUrl)) {
- throw ngError(22, '$location error! Invalid url "{0}", does not start with "{1}".', url, appBase);
+ throw $locationMinErr('istart', 'Invalid url "{0}", does not start with "{1}".', url, appBase);
}
var withoutHashUrl = withoutBaseUrl.charAt(0) == '#' ? beginsWith(hashPrefix, withoutBaseUrl) : withoutBaseUrl;
if (!isString(withoutHashUrl)) {
- throw ngError(49, '$location error! Invalid url "{0}", missing hash prefix "{1}".', url, hashPrefix);
+ throw $locationMinErr('nohash', 'Invalid url "{0}", missing hash prefix "{1}".', url, hashPrefix);
}
matchAppUrl(withoutHashUrl, this);
this.$$compose();