Hi,
i want to go through a structure in some kind of recursion, but the gui is not
acting the way i'd like it to :)
i attached the files for reproducing.
Short introduction to the main Model:
This is extracted from a "realworld" - Example so it maybe needs some explanation
on why i am doing things the way i did.
An array of products, each product has an array of attributes, and each attribute
can have attributes it self. This is where recursion takes place. Each product has
also a value called splitIdx which is a 2dimensional array. I need that for showing
purposes and sorting the attributes of the product.
This splitIdx is where the code got broke, when i switch the products.
The splitIdx should tell the gui: show these attributes of product here, and these there.
thats why the code goes this way :
<div ng:repeat="idxPart in currentProduct.splitIdx"> <!-- in real application it is just show left or right -->
<div ng:repeat="idx in idxPart"> <!-- take all the idx which should be showed here -->
<div ng:init="attribut = currentProduct.attributes[idx]"> <!-- tell the recursion on which attribut of the product to start -->
<ng:include src=" 'recursion.html' ">
</ng:include>
</div>
</div>
</div>
maybe this is just poor by my model design. or, as i guessed i just messed up with scope (sadly again).
anyway the product and it's attributes with subattributes are not correctly displayed.
what did i mess up?
-- Michael