javascript - how to select same select option in the next page -


enter image description herei 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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -