I'm trying to get the current route name or route path in my app.component when the route changes so that I can use the route name as a page class around a wrapper div. I'm trying to figure out the best way to handle this. Previously I was subscribing to the router changes property like I have listed below, but it seems like this is no longer available with @angular/router 3.0.0-alpha.3. If anyone has any thoughts or suggestions I would be most grateful.
this.router.changes.subscribe((val) => {
var path = this._location.path();
if (path.indexOf('page-name') !== -1) {
this.pageClass = 'page-name';
}
})