List of options created using array of object Arrs.On the basis of selected value the div element will show where condition will match.

<!DOCTYPE html> <html xmlns=""> <head> <title>Welcome to LearnKode - A code learning platform</title> <script src=""></script> </head> <body ng-app> <div ng-init="Arrs = [{ name: 'Car' }, { name: 'Fruit' }];Carcolors=[{color:'Red'},{color:'Green'}];Fruitcolors=[{color:'Red'},{color:'Yellow'}];Interiors=[{type:'Black Cloth'},{type:'Leather'}]"> Choose Object: <select ng-model="name" ng-options=" as for Arr in Arrs"></select> <div ng-if="name=='Car'"> Color: <select ng-options="Carcolor.color as Carcolor.color for Carcolor in Carcolors" ng-model="carColor"></select><br /> Interior: <select ng-options="Interior.type as Interior.type for Interior in Interiors" ng-model="interiorType"></select><br /> Model Number: <input type="text" /><br /> </div> <div ng-if="name=='Fruit'"> Color: <select ng-options="Fruitcolor.color as Fruitcolor.color for Fruitcolor in Fruitcolors" ng-model="fruitColor"></select><br /> Description: <input type="text" /> </div> </div> </body> </html>