For my shoppingCart project, I am working on dynamically bringing data into views. I am using routeParams in template.html but facing an issue. The data is arriving normally as checked via ng-href="#/store/{{something.name}}/{{ child.name }}" but it isn't working with ng-repeat.
index.html
<a style="cursor: pointer;" ng-href="#/store/{{something.name}}/{{ child.name }}">{{ child.display_name }}</a>
Routing in app.js
function store() {
this.fruits = [
new product("APL", "Apple", "Eat one every day to keep the doctor away!", 12, 90, 0, 2, 0),
new product("BAN", "Banana", "These are rich in Potassium and easy to peel.", 4, 120, 0, 2, 1)];
}
template.html
<pre>$routeParams.Category = {{$routeParams.Category}}</pre>
I really need this to work otherwise I would have to call it like store.fruits,store.vegetables and would have to make separate files too for each of them. Please HELP