Guest User

Untitled

a guest
Feb 16th, 2014
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .factory('Lines', ['$resource', function($resource){
  2.   return $resource('/api/lines/:lineId');
  3. }])
  4.  
  5. .controller('Ctrl', ['$scope', 'Lines', function($scope, Lines) {
  6.   $scope.lines = Lines.query();
  7.  
  8.   $scope.addTranslation = function(line, transForm) {
  9.     if (transForm.$valid) {
  10.       line.$save(function(){
  11.         line.open = false;
  12.         ...
  13.       });
  14.     }
  15.   };
  16. }]);
  17.  
  18. // partial.html
  19. ...
  20. <accordion-group ng-repeat="line in lines" is-open="line.open">
  21. ...
  22. </accordion-group>
Advertisement
Add Comment
Please, Sign In to add comment