router-testing.umd.min.js 3.5KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * @license Angular v6.0.9
  3. * (c) 2010-2018 Google, Inc. https://angular.io/
  4. * License: MIT
  5. */
  6. !function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@angular/common"),require("@angular/common/testing"),require("@angular/core"),require("@angular/router")):"function"==typeof define&&define.amd?define("@angular/router/testing",["exports","@angular/common","@angular/common/testing","@angular/core","@angular/router"],r):r((e.ng=e.ng||{},e.ng.router=e.ng.router||{},e.ng.router.testing={}),e.ng.common,e.ng.common.testing,e.ng.core,e.ng.router)}(this,function(e,r,t,o,n){"use strict";
  7. /**
  8. * @license
  9. * Copyright Google Inc. All Rights Reserved.
  10. *
  11. * Use of this source code is governed by an MIT-style license that can be
  12. * found in the LICENSE file at https://angular.io/license
  13. */
  14. var u=function(){function e(e){this.compiler=e,this._stubbedModules={}}return Object.defineProperty(e.prototype,"stubbedModules",{get:function(){return this._stubbedModules},set:function(e){var r,t,o={};try{for(var n=function u(e){var r="function"==typeof Symbol&&e[Symbol.iterator],t=0;return r?r.call(e):{next:function(){return e&&t>=e.length&&(e=void 0),{value:e&&e[t++],done:!e}}}}(Object.keys(e)),a=n.next();!a.done;a=n.next()){var i=a.value;o[i]=this.compiler.compileModuleAsync(e[i])}}catch(e){r={error:e}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(r)throw r.error}}this._stubbedModules=o},enumerable:!0,configurable:!0}),e.prototype.load=function(e){return this._stubbedModules[e]?this._stubbedModules[e]:Promise.reject(new Error("Cannot find module "+e))},e.decorators=[{type:o.Injectable}],e.ctorParameters=function(){return[{type:o.Compiler}]},e}();function a(e,r,t,o,u,a,i,l,s){var d=new n.Router(null,e,r,t,a,o,u,n.ɵflatten(i));return l&&(function c(e){return"shouldProcessUrl"in e}(l)?d.urlHandlingStrategy=l:(l.malformedUriErrorHandler&&(d.malformedUriErrorHandler=l.malformedUriErrorHandler),l.paramsInheritanceStrategy&&(d.paramsInheritanceStrategy=l.paramsInheritanceStrategy))),s&&(d.urlHandlingStrategy=s),d}var i=function(){function e(){}return e.withRoutes=function(r,t){return{ngModule:e,providers:[n.provideRoutes(r),{provide:n.ROUTER_CONFIGURATION,useValue:t||{}}]}},e.decorators=[{type:o.NgModule,args:[{exports:[n.RouterModule],providers:[n.ɵROUTER_PROVIDERS,{provide:r.Location,useClass:t.SpyLocation},{provide:r.LocationStrategy,useClass:t.MockLocationStrategy},{provide:o.NgModuleFactoryLoader,useClass:u},{provide:n.Router,useFactory:a,deps:[n.UrlSerializer,n.ChildrenOutletContexts,r.Location,o.NgModuleFactoryLoader,o.Compiler,o.Injector,n.ROUTES,n.ROUTER_CONFIGURATION,[n.UrlHandlingStrategy,new o.Optional]]},{provide:n.PreloadingStrategy,useExisting:n.NoPreloading},n.provideRoutes([])]}]}],e}();
  15. /**
  16. * @license
  17. * Copyright Google Inc. All Rights Reserved.
  18. *
  19. * Use of this source code is governed by an MIT-style license that can be
  20. * found in the LICENSE file at https://angular.io/license
  21. */
  22. /**
  23. * @license
  24. * Copyright Google Inc. All Rights Reserved.
  25. *
  26. * Use of this source code is governed by an MIT-style license that can be
  27. * found in the LICENSE file at https://angular.io/license
  28. */
  29. /**
  30. * @license
  31. * Copyright Google Inc. All Rights Reserved.
  32. *
  33. * Use of this source code is governed by an MIT-style license that can be
  34. * found in the LICENSE file at https://angular.io/license
  35. */e.SpyNgModuleFactoryLoader=u,e.setupTestingRouter=a,e.RouterTestingModule=i,Object.defineProperty(e,"__esModule",{value:!0})});