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
864
927
352.9k
How to get drop down object in drop down click event?
May 26 2018 2:27 AM
Hi i have a dropdown having values id and value.On the click event i need to use both id and value .now i am passing id only in ngmodel.how can i pass the object in ngmodel..so i can use in ts like object.id,and object.value
please help
this s my dropdown
<select class="styled-select" [(ngModel)]="id" (change)="onSelectYear($event.target.value)">
<option [ngValue]="select" disabled [selected]="true">--Select Model Year--</option>
<option *ngFor="let code of year " value={{code.id}}>{{code.value}}</option>
</select>
in ts file i shud get like
onSelectYear(obj: any) {
obj.id=
obj.value=
}
Reply
Answers (
1
)
how to refresh one component from another component?
Found the synthetic property @flyInOut. Please