Skip to content

Commit 47a29c9

Browse files
author
vakrilov
committed
chore: remove deprecated example
1 parent cbb51ab commit 47a29c9

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

Diff for: ng-sample/app/examples/router/clear-history-test.ts

+3-19
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,11 @@ import { BehaviorSubject } from "rxjs";
66

77
@Injectable()
88
class LocationLogService {
9-
public locationStack$ = new BehaviorSubject<Array<string>>([]);
109
public routerEvents$ = new BehaviorSubject<Array<string>>([]);
11-
public showStack: boolean = true;
1210

1311
constructor(router: Router, private strategy: NSLocationStrategy) {
1412
router.events.subscribe((e) => {
1513
this.routerEvents$.next([...this.routerEvents$.getValue(), e.toString()]);
16-
17-
let states = this.strategy._getStates()
18-
.map((v, i) => {
19-
return (i + "." + (v.isPageNavigation ? "[PAGE]" : "") + " \"" + v.url + "\"");
20-
})
21-
.reverse();
22-
23-
this.locationStack$.next(states);
2414
});
2515
}
2616
}
@@ -29,15 +19,9 @@ class LocationLogService {
2919
selector: "location-log",
3020
styleUrls: ["examples/router/styles.css"],
3121
template: `
32-
<GridLayout rows="auto *" columns="*">
33-
<button class="stretch"
34-
[text]="service.showStack ? 'show events' : 'show stack'"
35-
(tap)="service.showStack=!service.showStack"></button>
36-
37-
<ListView row="1"
38-
[items]="service.showStack ?
39-
(service.locationStack$ | async) :
40-
(service.routerEvents$ | async)"
22+
<GridLayout rows="*" columns="*">
23+
<ListView
24+
[items]="service.routerEvents$ | async"
4125
margin="10">
4226
4327
<ng-template let-data="item" let-odd="odd" let-even="even">

0 commit comments

Comments
 (0)