Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- .factory('Lines', ['$resource', function($resource){
- return $resource('/api/lines/:lineId');
- }])
- .controller('Ctrl', ['$scope', 'Lines', function($scope, Lines) {
- $scope.lines = Lines.query();
- $scope.addTranslation = function(line, transForm) {
- if (transForm.$valid) {
- line.$save(function(){
- line.open = false;
- ...
- });
- }
- };
- }]);
- // partial.html
- ...
- <accordion-group ng-repeat="line in lines" is-open="line.open">
- ...
- </accordion-group>
Advertisement
Add Comment
Please, Sign In to add comment