TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sujeet Raman
868
927
358.1k
Routparameter is expiring while switching to next component
Dec 19 2017 8:41 AM
Hi, in my roting app am using childroots.based on one id i need to bind 2 diffrent component ie:Student,Teacher
problem
1. in UI am getting 2 tabs
Students Teacher
student is loading according to id but if i switch teacher i lost the details of student id showing undefined
2.how can i use same param(here id) getteachers() in teacher component same as student
i am getting id from details component click event
event(){
this.Router.navigate(['Main/student',Id])
}
in student component.ts
this.subscription = this.Route
.params
.subscribe(params => {
this.Id = +params['MMId'];
this.getdetails(this.Id)
});
: i have created child roots(containing parameter route) and parent roots
path: 'Main',
component: Main,
children: [
{ path: 'student/:Id', component: studentComponent },
{
path: 'Teacher', component: TeacherComponent,}
Reply
Answers (
0
)
my computer system typescript is install but not show .
How to read webConfig key in angular 4 typescript file