Advertisement
Guest User

Untitled

a guest
Aug 21st, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. ERRORError: Uncaught (in promise): Error: Cannot match any routes. URL
  2. Segment: 'Demo/ng2'
  3. Error: Cannot match any routes. URL Segment: 'Demo/ng2'
  4. at Anonymous function
  5.  
  6. const routes: Routes = [
  7. {
  8. path: '',
  9. component: CatalogsComponent,
  10. pathMatch: 'full'
  11. }
  12. ];
  13.  
  14. export const appRoutingProviders: any[] = [];
  15.  
  16. // - Updated Export
  17. export const routing = RouterModule.forRoot(routes);
  18.  
  19. constructor(
  20. public http: Http,
  21. public dataService: DataService,
  22. public router: Router
  23. ) { }
  24.  
  25. ngOnInit() {
  26. this.dataService.getData()
  27. .subscribe(data => {
  28. // if (this.router.url == '') {
  29. // this.catalog = true;
  30. // }
  31.  
  32. this.itemData = data.Category;
  33. })
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement