wix-incubator / angular-tree-control

Angular JS Tree
http://wix.github.io/angular-tree-control
MIT License
708 stars 277 forks source link

IMPORTANT! Tree does not work inside a MODAL ! STUCK ! #214

Open destromas1 opened 8 years ago

destromas1 commented 8 years ago

I Am using https://github.com/dwmkerr/angular-modal-service

Inside MODAL , I wanna use https://github.com/wix/angular-tree-control . But this does not work inside the MODAL , but works fine if I do not use MODAL , just in Home Page

Please let me know what you think about the scenario.

yoavaa commented 8 years ago

I have no idea what;s going on. I guess they are doing something strange in this library. I'd try to debug how the tree is constructed in the modal popup - that is, during the execution of the modal template compile at https://github.com/dwmkerr/angular-modal-service/blob/master/src/angular-modal-service.js#L118-L120, what options are passed into the tree control at https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L104

is that the options object you expect?

destromas1 commented 8 years ago

@yoavaa

One more update , I tried https://github.com/angular-ui-tree/angular-ui-tree with keeping all other same . angular-ui-tree works fine inside the Modal . But wix/angular-tree-control does not work.

destromas1 commented 8 years ago

@yoavaa Your Tree control works fine if any options object we pass,right ? Coz inside the Library's code I saw if options props are not available it takes the defaults . But in the treeTransclude directive here https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L392 , scope.options is undefined . this is the issue .

yoavaa commented 8 years ago

But the trreeTransclude gets it's scope from the tree control - and should inherit the options (via prototype inheritance). Can you check what is the prototype hierarchy for this scope?

On Sun, May 1, 2016 at 11:18 AM Shahjada Talukdar notifications@github.com wrote:

@yoavaa https://github.com/yoavaa Your Tree control works fine if any options object we pass,right ? Coz inside the Library's code I saw if options props are not available it takes the defaults . But in the treeTransclude directive here https://github.com/wix/angular-tree-control/blob/master/angular-tree-control.js#L392 , scope.options is undefined . this is the issue .

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/wix/angular-tree-control/issues/214#issuecomment-216024985

destromas1 commented 8 years ago

@yoavaa

I fixed https://github.com/wix/angular-tree-control/pull/215

You can check and merge the PR

Mad-Head commented 8 years ago

I cloned the repository and it works for me (yeahhh!). But "bower install angular-tree-control" does not contain this fix and it's sad.

destromas1 commented 8 years ago

@Mad-Head I fixed in the Repo , not sure about the Bower!

Feels good , this helped you :+1:

Mad-Head commented 8 years ago

"templateOptions" also does not work with modals.