Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to load dynamic tree from REST #14

Closed
cwichoski opened this issue Jul 9, 2014 · 16 comments
Closed

How to load dynamic tree from REST #14

cwichoski opened this issue Jul 9, 2014 · 16 comments

Comments

@cwichoski
Copy link

Hi,

appears that only work with fixed tree, how I can load the tree dynamically from REST? And update that tree with new REST requests?

Thanks for any help.

@okigan
Copy link
Contributor

okigan commented Jul 14, 2014

dont think this is supported -- i might need this as well, so may have to add it (watch my fork of this project)

@khan4019
Copy link
Owner

sorry, i didnt get a chance to look into it. If you can add it, i will merge it

@graywolf336
Copy link
Contributor

I too am curious about this, since it is a feature I would need if I was to use this. I might play around with the code and see if I can get it, no promises though. 😄

@graywolf336
Copy link
Contributor

I figured out how, but I also made a few more changes to my version of it. If you're interested in seeing how I did it you can take a look here: https://github.com/graywolf336/tree-grid-directive/commit/17c25162d34bfc8bce3084fccdfd888bad5e4b84

@okigan
Copy link
Contributor

okigan commented Aug 17, 2014

Nice, will check it out

On Aug 16, 2014, at 11:30 PM, graywolf336 notifications@github.com wrote:

I figured out how, but I also made a few more changes to my version of it. If you're interested in seeing how I did it you can take a look here: graywolf336@17c2516


Reply to this email directly or view it on GitHub.

@aidanlister
Copy link

Oh dynamic data is really important and I can't get graywolf's version to work. Is someone able to update this?

@kpnigalye
Copy link

try using 'promise' feature by angular. That worked for me.

@aidanlister
Copy link

I got graywolf366's going. I also made an example on Plunkr, and showed how you can customise the template without changing the directive source:
http://plnkr.co/edit/bxejGsjMg3MaqnYcHKze?p=preview

@diosney
Copy link
Contributor

diosney commented Feb 9, 2015

@aidanlister I' m trying to see your plnkr but for some reason its giving me trouble to acces it.

Please, can you post the sample code to other place so I can see it? It doesn't have to be a live site, just the code (pastebin or another one could work).

Thanks in advance.

@aidanlister
Copy link

There's too much code, the plunkr seems to work for me in incognito?

@diosney
Copy link
Contributor

diosney commented Feb 10, 2015

@aidanlister That was for no use :( It simple doesn't load for me.

Nevertheless, I did I understand now, is it loading the whole data at a later moment using promises, right?

@aidanlister
Copy link

Try a different browser or device then...

On Wednesday, 11 February 2015, Diosney Sarmiento notifications@github.com
wrote:

@aidanlister https://github.com/aidanlister That was for no use :( It
simple doesn't load for me.

Nevertheless, I did I understand now, is it loading the whole data at a
later moment using promises, right?


Reply to this email directly or view it on GitHub
#14 (comment)
.

@diosney
Copy link
Contributor

diosney commented Feb 10, 2015

I did that and didn't worked.

Don't worry, @graywolf336 already answered me clarifying about the changes he made to the module.

@diosney
Copy link
Contributor

diosney commented Feb 12, 2015

@khan4019 You can closed this issue too, its already merged and included in the README.

@khan4019
Copy link
Owner

Awesome... thanks a lot... @diosney

@neran27
Copy link

neran27 commented Jul 31, 2015

Hi All,

For dynamic data / REST binding.,

if (myTreeData.length == 0) {
dataMiningFactory.getTreeData().success(function (data) {
rawTreeData = data;
myTreeData = getTree(rawTreeData, 'DemographicId', 'ParentId');
});
$timeout(function () {
$scope.tree_data = myTreeData;
}, 5000);
}

This will do the purpose for me, but only when the tree alone is added in the page. But when integrated with other HTML elements, the data is returned but tree is not updated on the UI. :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants