mirror of
https://github.com/PacktPublishing/Web-Development-with-Blazor-Second-Edition.git
synced 2026-03-17 09:54:40 +01:00
1 line
665 KiB
JSON
1 line
665 KiB
JSON
|
|
{"ast":null,"code":"/**\n * @license Angular v13.1.1\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\nimport * as i0 from '@angular/core';\nimport { ɵisObservable, ɵisPromise, EventEmitter, Directive, Attribute, Output, Component, NgModuleRef, InjectionToken, InjectFlags, NgModuleFactory, ɵConsole, NgZone, Injectable, Input, HostListener, HostBinding, Optional, ContentChildren, Injector, Compiler, NgProbeToken, ANALYZE_FOR_ENTRY_COMPONENTS, SkipSelf, Inject, APP_INITIALIZER, APP_BOOTSTRAP_LISTENER, NgModule, ApplicationRef, Version } from '@angular/core';\nimport { from, of, BehaviorSubject, combineLatest, Observable, EmptyError, concat, defer, EMPTY, ConnectableObservable, Subject } from 'rxjs';\nimport { map, switchMap, take, startWith, scan, filter, catchError, concatMap, last as last$1, first, mergeMap, tap, takeLast, refCount, finalize, mergeAll } from 'rxjs/operators';\nimport * as i3 from '@angular/common';\nimport { Location, LocationStrategy, PlatformLocation, APP_BASE_HREF, ViewportScroller, HashLocationStrategy, PathLocationStrategy, LOCATION_INITIALIZED } from '@angular/common';\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * Base for events the router goes through, as opposed to events tied to a specific\n * route. Fired one time for any given navigation.\n *\n * The following code shows how a class subscribes to router events.\n *\n * ```ts\n * import {Event, RouterEvent, Router} from '@angular/router';\n *\n * class MyService {\n * constructor(public router: Router) {\n * router.events.pipe(\n * filter((e: Event): e is RouterEvent => e instanceof RouterEvent)\n * ).subscribe((e: RouterEvent) => {\n * // Do something\n * });\n * }\n * }\n * ```\n *\n * @see `Event`\n * @see [Router events summary](guide/router-reference#router-events)\n * @publicApi\n */\n\nclass RouterEvent {\n constructor(\n /** A unique ID that the router assigns to every router navigation. */\n id,\n /** The URL that is the destination for this navigation. */\n url) {\n this.id = id;\n this.url = url;\n }\n\n}\n/**\n * An event triggered when a navigation starts.\n *\n * @publicApi\n */\n\n\nclass NavigationStart extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id,\n /** @docsNotRequired */\n url,\n /** @docsNotRequired */\n navigationTrigger = 'imperative',\n /** @docsNotRequired */\n restoredState = null) {\n super(id, url);\n this.navigationTrigger = navigationTrigger;\n this.restoredState = restoredState;\n }\n /** @docsNotRequired */\n\n\n toString() {\n return `NavigationStart(id: ${this.id}, url: '${this.url}')`;\n }\n\n}\n/**\n * An event triggered when a navigation ends successfully.\n *\n * @see `NavigationStart`\n * @see `NavigationCancel`\n * @see `NavigationError`\n *\n * @publicApi\n */\n\n\nclass NavigationEnd extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id,\n /** @docsNotRequired */\n url,\n /** @docsNotRequired */\n urlAfterRedirects) {\n super(id, url);\n this.urlAfterRedirects = urlAfterRedirects;\n }\n /** @docsNotRequired */\n\n\n toString() {\n return `NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`;\n }\n\n}\n/**\n * An event triggered when a navigation is canceled, directly or indirectly.\n * This can happen for several reasons including when a route guard\n * returns `false` or initiates a redirect by returning a `UrlTree`.\n *\n * @see `NavigationStart`\n * @see `NavigationEnd`\n * @see `NavigationError`\n *\n * @publicApi\n */\n\n\nclass NavigationCancel extends RouterEvent {\n constructor(\n /** @docsNotRequired */\n id,\n /** @docsNotRequired */\n url,\n /** @docsNotRequired */\n reason) {\n super(id, url);\n this.reason = reason;\n }\n /** @docsNotRequired */\n\n\n toString() {\n return `NavigationCancel(id: ${this.id}, ur
|