Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Hello guys I am working on an application where I am using django-tastypie as backend and AngularJs for front end.I am totally new to AngularJs. In my template there may be multiple HTML Select tags based on the conditions. I want to select the value of the last select element using AngularJs.

my template HTML is

<label>Topic Level 0:</label>
<select ng-model="topics_level_zero_model" ng-options="topic.name for topic in topics_level_zero_list" ng-change="showFirstLevelTopics()">
</select></br>
<label>Topic Level 1:</label>
<select ng-model="topics_level_one_model" ng-options="topic.name for topic in topics_level_one_list" ng-change="showSecondLevelTopics()">
</select></br>
<label>Topic Level 2:</label>
<select ng-model="topics_level_two_model" ng-options="topic.name for topic in topics_level_two_list" ng-change="showThirdLevelTopics()">
</select></br>

these select tags may be less or more depends on conditions. I want to get the value of the last select tag from these elements. Can I use a specific attribute for all these select elements to get the array of these select tags?. How can I apply JavaScript getElementsByName() method in AngularJs? or tell me any other and better way to solve this problem.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.