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 Id and Value from a dropdwn in angular 2?
Feb 14 2018 4:03 AM
i have a dropdown like
<select [(ngModel)]="car.Marketid" required name="Marketid" id="Marketid" ngModel class="form-control">
<option [ngValue]="select" disabled [selected]="true">--Select Market--</option>
<option *ngFor="let code of names" value="{{code.marketId}}">{{code.marketName}} - {{code.SpecMarketCode}}</option>
</select>
in my "save" methode in ts i need to get Markrtid which i selected from this dropdown and MarketName but here [(ngModel)]="car.Marketid" so im getting only id in my save methode in ts file. i need to get marketname also
how can i get?
Reply
Answers (
2
)
how to register and login with google/facebook using angular
Jasmine HTML loader is not loading in angular 4 webpack