/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/examples/common/location/ts/path_location_component.ts
31 строка
881 B
Matthieu Riegler
refactor(core): Migrate all packages with the `explicit-standalone-flag` schematic. (#58160)
14 окт 2024, 17:58
14 окт 2024, 17:58
09df589
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ // #docregion LocationComponent import {Location, LocationStrategy, PathLocationStrategy} from '@angular/common'; import {Component} from '@angular/core'; @Component({ selector: 'path-location', providers: [Location, {provide: LocationStrategy, useClass: PathLocationStrategy}], template: ` <h1>PathLocationStrategy</h1> Current URL is: <code>{{ location.path() }}</code ><br /> Normalize: <code>/foo/bar/</code> is: <code>{{ location.normalize('foo/bar') }}</code ><br /> `, standalone: false, }) export class PathLocationComponent { location: Location; constructor(location: Location) { this.location = location; } } // #enddocregion