javascript - how to select same select option in the next page -
i have select tag in home page, if selected option in select tag , moved on page(second page) same option selected in home page should selected in select tag of second page
<div> <div class="col-md-3 " ng-hide="ishidden" style="padding-top:10px;" ng-init="childorganization()"> <select class="form-control custom-form-control" ng-model="child" ng-options="organization.organizationname organization in childorganization track organization.organizationid" ng-change = "childorganizationid(child)"> <option value="" selected="selected">{{organizationname}}</option> </select> </div> </div>
for getting option selected don't need use -
<option value="" selected="selected">{{organizationname}}</option>
you can assign $scope.child = 'organization name'
, value selected in dropdown.
secondly dropdown same in pages can put in index.html(or partial view) , use $rootscope access in pages.
Comments
Post a Comment