Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Javascript Context Menuwith AngularJS Table

I am creating a shift planner, here i've made a JS context menu and trying to display the shift via angular. On clicking on any table cell all the cells are getting updated is there any workaround for this? What am i doing wrong. Plunker link :http://plnkr.co/edit/ZAWXlTsY0Z7SPeEVRtTe`

    <ul ng-repeat="s in shifts">
            <li  ng-click="select(s)" >{{s.title}}</li>
    </ul>

`

like image 358
user3440707 Avatar asked Mar 12 '26 19:03

user3440707


1 Answers

Here is the solution for when you change the select option, then you table data will changes

<select class="filter" name="show-filter" ng-model="selectedDept" 
    ng-options="d.title for d in departments" ng-change="changeTable()">
  </select>

in Script :

$scope.changeTable - function(){    
  $scope.selectedDept // selected value
  //get the results and append here
}
like image 200
Mohammad Fareed Avatar answered Mar 15 '26 08:03

Mohammad Fareed