{"action":"created","issue":{"url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/28","repository_url":"https://api.github.com/repos/valor-software/ng2-dragula","labels_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/28/comments","events_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/28/events","html_url":"https://github.com/valor-software/ng2-dragula/issues/28","id":127738762,"number":28,"title":"Second container won't update","user":{"login":"AleRob90","id":11090328,"avatar_url":"https://avatars.githubusercontent.com/u/11090328?v=3","gravatar_id":"","url":"https://api.github.com/users/AleRob90","html_url":"https://github.com/AleRob90","followers_url":"https://api.github.com/users/AleRob90/followers","following_url":"https://api.github.com/users/AleRob90/following{/other_user}","gists_url":"https://api.github.com/users/AleRob90/gists{/gist_id}","starred_url":"https://api.github.com/users/AleRob90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AleRob90/subscriptions","organizations_url":"https://api.github.com/users/AleRob90/orgs","repos_url":"https://api.github.com/users/AleRob90/repos","events_url":"https://api.github.com/users/AleRob90/events{/privacy}","received_events_url":"https://api.github.com/users/AleRob90/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"NathanWalker","id":457187,"avatar_url":"https://avatars.githubusercontent.com/u/457187?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanWalker","html_url":"https://github.com/NathanWalker","followers_url":"https://api.github.com/users/NathanWalker/followers","following_url":"https://api.github.com/users/NathanWalker/following{/other_user}","gists_url":"https://api.github.com/users/NathanWalker/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanWalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanWalker/subscriptions","organizations_url":"https://api.github.com/users/NathanWalker/orgs","repos_url":"https://api.github.com/users/NathanWalker/repos","events_url":"https://api.github.com/users/NathanWalker/events{/privacy}","received_events_url":"https://api.github.com/users/NathanWalker/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-01-20T17:30:00Z","updated_at":"2016-02-08T04:27:22Z","closed_at":null,"body":"Hello, so i'm trying to use an example from the demo page. The example have title \"Angular-specific example. Fancy some ngFor?\". So into dragula.providers.ts i changed line 75 \r\nfrom:\r\ndrake.on('remove',function removeModel (el, source) { //bla bla bla }))\r\nto:\r\ndrake.on('remove', (el, source) => { //bla bla bla})) \r\nCause it was complaining about removeModel that doesn't have an emit function on line 83.\r\n\r\nNow my class look like this:\r\nexport class Page1 {\r\n  public many: Array<Object> = [{name: 'buton', type:'button'},{name:'container', type:'text'}];\r\n  public many2: Array<Object> = [{name: 'alt buton', type:'button'},{name:'alt container', type:'text'}];\r\n  constructor(private dragulaService: DragulaService) {\r\n    dragulaService.setOptions('first-bag', {\r\n      removeOnSpill: true,\r\n      copy: function(el, source){\r\n        return source.className.indexOf('can_move') != -1;\r\n      },\r\n      accepts: function (el, source) {\r\n        return source.className.indexOf('can_move') === -1;\r\n        // return el.className === 'can-copy';\r\n      }\r\n    });\r\n    dragulaService.dropModel.subscribe((value) => {\r\n      this.onDropModel(value.slice(1));\r\n    });\r\n    dragulaService.removeModel.subscribe((value) => {\r\n      this.onRemoveModel(value.slice(1));\r\n    });\r\n  }\r\n  private onDropModel(args) {\r\n    let [el, target, source] = args;\r\n    window.console.log('This is interesting fact', this.many2); // This is the line that give me a headache\r\n  }\r\n\r\n  private onRemoveModel(args) {\r\n    let [el, source] = args;\r\n  }\r\n}\r\n\r\nAnd the Html looks like this:\r\n<blockquote>\r\n \r\n    <xmp> <div class='wrapper'> </xmp><br />\r\n      <xmp> <div class='container can_move' [dragula]='\"first-bag\"' [dragulaModel]='many'> </xmp><br />\r\n        <xmp> <container1 *ngFor=\"#item of many\" [type]=\"item.type\" name=\"item.name\"></container1> </xmp><br />\r\n    <xmp>   </div> </xmp><br />\r\n     <xmp>  <div class='container container2' [dragula]='\"first-bag\"' [dragulaModel]='many2' style=\"text-align:center\"> </xmp><br />\r\n         <xmp><div *ngFor='#text of many2'> </xmp><br />\r\n          <xmp> <button *ngIf=\"text.type=='button'\">{{text.name}}</button> </xmp><br />\r\n         <xmp>  <div *ngIf=\"text.type=='text'\">{{text.name}}</div> </xmp><br />\r\n         <xmp></div> </xmp><br />\r\n      <xmp> </div> </xmp><br />\r\n     <xmp></div> </xmp><br />\r\n</blockquote>\r\nOk so the problem is not a problem until i empty this.many2 and after that i try to move something from first container to second container. When i try to move one item from many1 onDropModel is called and my many2 has one object but into my Html elements it doesn't show at all...after i move some more times i get something in my second container but this.many2.length is >1 even if i have just one element showed.\r\n\r\nI hope you understand otherwise tell me so i will explain more"},"comment":{"url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/comments/181190890","html_url":"https://github.com/valor-software/ng2-dragula/issues/28#issuecomment-181190890","issue_url":"https://api.github.com/repos/valor-software/ng2-dragula/issues/28","id":181190890,"user":{"login":"AleRob90","id":11090328,"avatar_url":"https://avatars.githubusercontent.com/u/11090328?v=3","gravatar_id":"","url":"https://api.github.com/users/AleRob90","html_url":"https://github.com/AleRob90","followers_url":"https://api.github.com/users/AleRob90/followers","following_url":"https://api.github.com/users/AleRob90/following{/other_user}","gists_url":"https://api.github.com/users/AleRob90/gists{/gist_id}","starred_url":"https://api.github.com/users/AleRob90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AleRob90/subscriptions","organizations_url":"https://api.github.com/users/AleRob90/orgs","repos_url":"https://api.github.com/users/AleRob90/repos","events_url":"https://api.github.com/users/AleRob90/events{/privacy}","received_events_url":"https://api.github.com/users/AleRob90/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T04:27:22Z","updated_at":"2016-02-08T04:27:22Z","body":"Any updates?:("}}