diff options
| author | Misko Hevery | 2010-04-03 20:19:55 -0700 |
|---|---|---|
| committer | Misko Hevery | 2010-04-03 20:23:16 -0700 |
| commit | 5dcf9bb4feb144b3a54a43524210dd7d0bb4213e (patch) | |
| tree | 966014f5f83409766d8d84caf6e772d1398d385f /src | |
| parent | a80a61839a66d244c8bb14bbe2975746e02516c8 (diff) | |
| download | angular.js-5dcf9bb4feb144b3a54a43524210dd7d0bb4213e.tar.bz2 | |
browser is now injectable into the system
Diffstat (limited to 'src')
| -rw-r--r-- | src/Angular.js | 16 | ||||
| -rw-r--r-- | src/AngularPublic.js | 17 | ||||
| -rw-r--r-- | src/Browser.js | 1 | ||||
| -rw-r--r-- | src/angular-bootstrap.js | 1 | ||||
| -rw-r--r-- | src/services.js | 4 |
5 files changed, 20 insertions, 19 deletions
diff --git a/src/Angular.js b/src/Angular.js index 86fb5291..d00a9bf6 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -33,22 +33,6 @@ function angularAlert(){ log(arguments); window.alert.apply(window, arguments); } -extend(angular, { - 'compile': compile, - 'copy': copy, - 'extend': extend, - 'foreach': foreach, - 'noop':noop, - 'identity':identity, - 'isUndefined': isUndefined, - 'isDefined': isDefined, - 'isString': isString, - 'isFunction': isFunction, - 'isNumber': isNumber, - 'isArray': isArray, - 'alert': angularAlert -}); - function foreach(obj, iterator, context) { var key; if (obj) { diff --git a/src/AngularPublic.js b/src/AngularPublic.js new file mode 100644 index 00000000..b9d0f9d7 --- /dev/null +++ b/src/AngularPublic.js @@ -0,0 +1,17 @@ +extend(angular, { + 'element': jqLite, + 'compile': compile, + 'scope': createScope, + 'copy': copy, + 'extend': extend, + 'foreach': foreach, + 'noop':noop, + 'identity':identity, + 'isUndefined': isUndefined, + 'isDefined': isDefined, + 'isString': isString, + 'isFunction': isFunction, + 'isNumber': isNumber, + 'isArray': isArray +}); + diff --git a/src/Browser.js b/src/Browser.js index bdf57386..893459ae 100644 --- a/src/Browser.js +++ b/src/Browser.js @@ -37,7 +37,6 @@ Browser.prototype = { existingURL += '#'; if (existingURL != url) this.location.href = url; - this.existingURL = url; }, getUrl: function() { diff --git a/src/angular-bootstrap.js b/src/angular-bootstrap.js index 7484b0c3..d9633854 100644 --- a/src/angular-bootstrap.js +++ b/src/angular-bootstrap.js @@ -47,6 +47,7 @@ addScript("/Parser.js"); addScript("/Resource.js"); addScript("/Browser.js"); + addScript("/AngularPublic.js"); // Extension points addScript("/apis.js"); diff --git a/src/services.js b/src/services.js index 59c21d36..16b48031 100644 --- a/src/services.js +++ b/src/services.js @@ -24,9 +24,9 @@ angularService("$location", function(browser){ } } var hashKeyValue = toKeyValue(location.hashSearch); - return location.href + - (location.hashPath ? location.hashPath : '') + + var hash = (location.hashPath ? location.hashPath : '') + (hashKeyValue ? '?' + hashKeyValue : ''); + return location.href.split('#')[0] + '#' + (hash ? hash : ''); } browser.watchUrl(function(url){ location(url); |
