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
ahmed elbarbary
NA
1.6k
275.4k
How to collect data from more select option drop down angul?
May 16 2020 3:10 AM
How to collect data from more select option drop down angul?
i create more derop down list dynamically but my problem is how
to collect all selected from drop down list created
suppose i created two drop dow
then i need to generate statment from selected as below
dropdown1 = 'fruit' and dropdown2='banana'
onChange($event)
{
let textdata=$event.target.options[$event.target.options.selectedIndex].text;
let statusdata:any =
this
.FilterBinddata.filter(s=>s.reportSource==textdata)[0].reportSource2;
console.log(
"textdata is"
+ textdata)
console.log(
"statusdata is"
+ JSON.stringify(statusdata))
}
<div
class
=
"form-group"
style=
"display: flex; align-items: center;margin-top:10px;margin-left:20px;"
>
<div *ngFor=
"let fil of FilterList"
style=
"padding-bottom: 10px;margin-right: 10px;"
>
{{fil.controlName | slice:3:15}}
<Select id=
"{{fil.controlName}}"
(change)=
"onChange($event)"
class
=
"form-control"
style=
"width:200px; margin-right:10px;"
>
<option value=
"0"
>-Select-</option>
<option *ngFor=
"let fil2 of this.FilterBinddata"
>
<div *ngIf=
"fil.controlName===fil2.filterName"
>
{{fil2.reportSource}}
</div>
</option>
</Select>
<div>
</div>
</div>
Reply
Answers (
1
)
How to solve error length with null when click page number ?
invalid argument pipe string is not function for pipe datepi