I've been trying to figure out how to do dynamic views while still retaining the way the collections are pulling data, etc. Normally, in backbone, I'd just do a collection.fetch and on('reset',this.render), but that doesn't seem to work.
I'm needing to load a popover with a detail list when I click on an item. I've figured out a way to do it, but I had to edit some of the core base View code and I wanted to see if I could get some ideas on why some things are as they are.
1) In fetchLazy in shared/base/view.js, what is the point of this line?
I gave up on this since there was no feedback. Closing it. I went to pulling the data with this.app.fetch and then passed the data into a new view's collection instead since that works without any changes.
I've been trying to figure out how to do dynamic views while still retaining the way the collections are pulling data, etc. Normally, in backbone, I'd just do a collection.fetch and on('reset',this.render), but that doesn't seem to work.
I'm needing to load a popover with a detail list when I click on an item. I've figured out a way to do it, but I had to edit some of the core base View code and I wanted to see if I could get some ideas on why some things are as they are.
1) In fetchLazy in shared/base/view.js, what is the point of this line?
There doesn't seem to be a way to pass in params for fetchLazy. Is there a way to do this? I edited it to pass in params like this:
The original code is this:
2) Is view.js's attach method meant to be callable from outside code?
At least to get this to work, I added in:
so that I could call it from the outside and pass in params.
Then, I'm able to load the view by doing this:
Is there a better or easier way? If not, then, can you comment on this approach and if it's ok, I can submit a pull request?