Skip to Content
0
Former Member
Aug 12, 2015 at 06:44 PM

navigate odata in the controller

28 Views

I have searched around but i cant find something like this....

My oData is like this

- Categories (linked to Products with (id))

- Products

I bind the oData in the Component.js.

I load the first page with a table and bind the rows. (/Categories)

After you click a row I use the router to pass the data context to the second page. ( Category('001) ) so that i can drill down.

Now I am in the second page, how can I use the passed variable (Category('001)) to navigate the oData to this Category.

I know you can bind the rows in the UI

this._oNavigationTable.bindItems({
 path: passedId",
});

But I want the data in a variable because I need the data in the controller to do some stuff with it and not in the UI.

But I have no clue how to "navigate" the odata to the new url and "fetch" the data from it into an array (because the result is more then one)