diff options
Diffstat (limited to 'src/services.js')
| -rw-r--r-- | src/services.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/services.js b/src/services.js index 8df23564..a5158149 100644 --- a/src/services.js +++ b/src/services.js @@ -1,11 +1,12 @@ +var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?([^\?#]+)(\?([^#]*))?(#(.*))?$/, + HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/, + DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21}; + angularService("$window", bind(window, identity, window)); angularService("$document", function(window){ return jqLite(window.document); }, {inject:['$window']}); -var URL_MATCH = /^(file|ftp|http|https):\/\/(\w+:{0,1}\w*@)?([\w\.-]*)(:([0-9]+))?([^\?#]+)(\?([^#]*))?(#(.*))?$/; -var HASH_MATCH = /^([^\?]*)?(\?([^\?]*))?$/; -var DEFAULT_PORTS = {'http': 80, 'https': 443, 'ftp':21}; angularService("$location", function(browser){ var scope = this, location = {parse:parseUrl, toString:toString, update:update}, @@ -213,7 +214,7 @@ function switchRouteMatcher(on, when, dstName) { return match ? dst : null; } -angularService('$route', function(location, params){ +angularService('$route', function(location){ var routes = {}, onChange = [], matcher = switchRouteMatcher, |
