2016-07-25 21:21:24
Angular
, 2016-07-25 21:21:24

AngularJs and passing data by $location.path()?

how to get vm.q and vm.items in the template that $location.path throws on
449d9f370777443b81e6440524710113.png
The search function is in the NavbarController
In the routing like this:
3cc4926ee6eb40fd8353b020334a273a.png
Template:

<h3>Результат поиска по запросу: {{vm.q}}</h3>
<ul ng-repeat='item in vm.items'>
    <li>{{item.name}}</li>
</ul>
</span>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daniil Sorokin, 2016-07-25
@DanSorokin

Can I see the template?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question