Hi I am using Angular 2 final with router 3.0. I want to filter the events that are emitted from this.router.events
What I want to do :
PLEASE NOTE:
I would like to mention a few things that the above answers are not addressing.
RxJs is a standalone library, and for that matter its operations are standalone methods as well. map, filter etc are operator methods that are not accessed through an object. Remember that you import them seperately.
So for example you cannot import { filter}
and want to access it through the router
object. That will never work because a router
object is an angular specific class instance somewhere in the API's. Angular provides a pipe()
method that allows you to register methods that must be chained in the process before moving to the next method within the router
that aren't part of the router
object.
ALWAYS REMEMBER THAT