Working on the routing, damnit.
This commit is contained in:
parent
d03380c9fa
commit
cbb62012df
@ -15,8 +15,8 @@ const appRoutes: Routes = [
|
||||
{path: 'home', component: HomeComponent},
|
||||
{path: 'posts', component: PostsComponent},
|
||||
{path: 'cv', component: CvComponent},
|
||||
{path: '', redirectTo: 'home', pathMatch: 'full'},
|
||||
{path: '*', redirectTo: 'home', pathMatch: 'full'}
|
||||
// {path: '', redirectTo: 'home', pathMatch: 'full'},
|
||||
// {path: '*', redirectTo: 'home', pathMatch: 'full'}
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
@ -9,8 +9,10 @@ export class StateService {
|
||||
private tagFilter: any = [];
|
||||
private language: string;
|
||||
|
||||
constructor() {
|
||||
|
||||
constructor(private router: Router) {
|
||||
router.events.subscribe(event => {
|
||||
console.log('stateservice detects a route event!' + event);
|
||||
});
|
||||
}
|
||||
|
||||
// /**
|
||||
@ -27,6 +29,9 @@ export class StateService {
|
||||
// }
|
||||
|
||||
shouldDisplay(post: Post): boolean {
|
||||
|
||||
console.log('state service url: ' + this.router.url);
|
||||
|
||||
// check whether all filters are true or false: that case, just show everything
|
||||
let foundTrue = false;
|
||||
let foundFalse = false;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user