1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/common"),require("@angular/core"),require("@angular/router"),require("@angular/upgrade/static")):"function"==typeof define&&define.amd?define("@angular/router/upgrade",["exports","@angular/common","@angular/core","@angular/router","@angular/upgrade/static"],r):r(((e=e||self).ng=e.ng||{},e.ng.router=e.ng.router||{},e.ng.router.upgrade={}),e.ng.common,e.ng.core,e.ng.router,e.ng.upgrade.static)}(this,function(e,r,t,a,n){"use strict";
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | var o,i=u;function u(e){return function(){c(e)}}function c(e,t){if(void 0===t&&(t="path"),!e.$injector)throw new Error("\n RouterUpgradeInitializer can be used only after UpgradeModule.bootstrap has been called.\n Remove RouterUpgradeInitializer and call setUpLocationSync after UpgradeModule.bootstrap.\n ");var n=e.injector.get(a.Router),o=e.injector.get(r.Location);e.$injector.get("$rootScope").$on("$locationChangeStart",function(e,r,a){var i;if("path"===t)i=s(r);else{if("hash"!==t)throw"Invalid URLType passed to setUpLocationSync: "+t;var u=r.indexOf("#");i=s(r.substring(0,u)+r.substring(u+1))}var c=o.normalize(i.pathname);n.navigateByUrl(c+i.search+i.hash)})}function s(e){return o||(o=document.createElement("a")),o.setAttribute("href",e),o.setAttribute("href",o.href),{pathname:"/"+o.pathname.replace(/^\//,""),search:o.search,hash:o.hash}}
|
14 |
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | e.RouterUpgradeInitializer={provide:t.APP_BOOTSTRAP_LISTENER,multi:!0,useFactory:i,deps:[n.UpgradeModule]},e.locationSyncBootstrapListener=u,e.setUpLocationSync=c,e.ɵ0=i,Object.defineProperty(e,"__esModule",{value:!0})}); |
\ | No newline at end of file |