javascript - Backbone access a View from model in another Collection -


I am learning the vertebra and I love it. At the moment I am stuck in a problem, I am not sure how to solve it.

I have two collections of items:

  1. In the item list
  2. In the shopping list

Each collection is associated with each model because they are the same product, but I am making it a new model for managing it separately for each handle. So when I remove an item from the shopping list, it does not remove it from the item list

The problem occurs when I add an element to the shopping list from the item list. At this point, I see the color of the cover visually that it has been added. But then when I remove it from the shopping list, I do not know how to model in the shopping list in the list of items in the list of items, there is a new one from the same product.

You will help in understanding.

Can you suggest how to use a scene from a model, or link a scene?

Instead of creating a new model for shopping list collection, you can share the same model and You can use an additional feature to find out if it's inside the shopping list or not. Depending on the structure of your program, you can listen to the item collection in the shopping list store, to see if a model has modified its added attribute, if they are, Collections to be added to the list. Once an item is removed from the shopping list store, the added attribute is updated to reflect which will allow you to remove the highlight color.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -