SHARE
TWEET
Untitled
a guest
Oct 15th, 2016
6
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- 'use strict';
- var app = angular.module('angular-dragula-example', [angularDragula(angular)]);
- app.controller('NestedRepeatCtrl', ['$scope',
- function ($scope) {
- $scope.groups = [
- {
- name: 'Group A',
- items: [{name: 'Item A'},{name: 'Item B'},{name: 'Item C'},{name: 'Item D'}]
- },
- {
- name: 'Group B',
- items: [{name: 'Item 1'},{name: 'Item 2'},{name: 'Item 3'},{name: 'Item 4'}]
- }
- ];
- $scope.$on('nested-bag.drop', function(e, el, container, source) {
- console.log(container.scope());
- });
- }
- ])
- /* Need to push items to $scope.groups[0] and $scope.groups[1] */
- container.group[0].items.push({
- name: 'Pushed item'
- })
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy.
