Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Routes([
- { path: '/', component: StartComponent },
- {path: '/:projId/:userName', component: ProjectListComponent},
- { path: '*', component: StartComponent },
- ])
- import {Component, OnInit} from '@angular/core';
- import {RouteParams} from '@angular/router-deprecated';
- @Component({
- ...
- })
- export class ProjectListComponent implements OnInit {
- userName:string;
- projId:string;
- constructor(private params:RouteParams) {
- this.userName = params.get('userName');
- this.projId = params.get('projId');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement