Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- imports: [
- UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too.
- RouterModule.forRoot([
- { path: '', redirectTo: 'home', pathMatch: 'full' },
- { path: 'subscriber', component: SubscriberComponent },
- { path: '**', redirectTo: 'home' }
- ]),
- //HttpModule
- FormsModule
- ]
- ngOnInit() {
- let id = '';
- this.activatedRoute.params.subscribe((params: Params) => {
- id = params['id'];
- if (id != '') {
- this.viewData(id);
- }
- console.log(id);
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement