Changing the values of a select control based on another select control

8 views
Skip to first unread message

winlight...@gmail.com

unread,
May 27, 2018, 8:05:26 AM5/27/18
to Angular and AngularJS discussion
Hi,
I am total newbie and am learning angular and other related js stuff. I am doing a learning project that involves a form which has two <select> controls. Namely "Standard" and "Division". 
The "Standard" has values from 1 to 12 (i. e. standards/grades of a school) and the division has values as A, B, C, D, Arts, Commerce, Science.

Now I want to display the values of A, B, C & D in the Division <select> only when values 1 to 10 are selected i.e. the the "Divisions" A to D are only available to "Standards" 1 to 10 and the rest "Arts, Commerce, Science" will only be available when values 11 or 12 are selected in the the Standard <select>. 

I tried putting a variable called "isABCD" in the ts file and using "*ngIf" in the options of the "Divisions" <select> to show the values but it didn't work

Kindly help me out 

WInlight
Reply all
Reply to author
Forward
0 new messages