Last active
January 13, 2019 13:40
-
-
Save realtomaszkula/fca8a3891d03ff56d83d231bf5dd27a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-details-page', | |
template: '<pre>{{ state$ | async | json }}</pre>' | |
}) | |
export class DetailsPageComponent implements OnInit { | |
state$: Observable<object>; | |
constructor(public activatedRoute: ActivatedRoute) {} | |
ngOnInit() { | |
this.state$ = this.activatedRoute.paramMap | |
.pipe(map(() => window.history.state)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment