Currently, I am working with Angular JS version 2.0.0 where I am passing values through my code:
import {Component} from "angular2/core"
import {bootstrap} from 'angular2/platform/browser';
import {Users} from "../users/component"
import {Users_detail} from "../users_detail/component"
import {
RouteConfig,RouterModule,
ROUTER_DIRECTIVES,
} from 'angular2/router';
@RouteConfig([
{path:'/users', name: 'Users', component: Users},
{path:'/users_detail/:id', name: 'Users_detail', component: User_retailer},
])
I am encountering an issue on how to retrieve the 'id' value in the 'Users_detail' file, users_detail.ts.
import { Router,ActivatedRoute } from 'angular2/router';
constructor( private route: ActivatedRoute) {
}
An error message is being shown as follows:
"Cannot resolve all parameters for User_retailer(?). Make sure they all have a valid type or annotations."