Search Posts

Category: angularjs-bootstrap

How to call a function when angularjs accordion open only

Hi I am using angularjs ui bootstrap accordion. Here i want to call when user click on accordion call one function and get user Here is the code please help me thnks in advance $scope.load_userdata= function(user_id) { console.log(user_id); } <uib-accordion close-others=”oneAtATime”> <div uib-accordion-group class=”panel-default” ng-repeat=”user in users”> <uib-accordion-heading ng-click=”load_userdata(”> <div class=”table”> <div style=”width: 50%”> @{{}} </div> <div> Load user data </div> </div> </uib-accordion-heading> </div> </uib-accordion> data and display it Source: AngularJS

Angular pre-selected

I have a modal that can edit. But in my modal I cant pre-select. This is my HTML <select ng-model=’names.productionType’ ng-options=”data for data in productionType”></select> This is my Script $scope.productionType =[ “Article LP Composition”, “Normal LP Composition”, “Reading Material”, “Transcribed Manuscript”, “LP Production” ]; So far this is what I tried HTML <select ng-model=’editable.productionType’ ng-options=”data for data in productionType” ng-selected=”editable.productionType='{{names.production_type}}'”></select> In my script $scope.names.productionType = “Normal LP Composition”; It will pre selected but the problem […]