1

I am new to AngularJs. I have a requirement where I have to lookup for an IP Address search bar and then display the search results below while showing the search bar. Both the views should be loaded from a partial file.

The search bar is one section of div and the search results in another div section. With regular ng-route, this is not possible. Hence, I am planning to use AngulrUI-router

  • Can I use AngularUI router for this use-case since my initial understanding of the angular-ui router is more of state machines. If we can use ui-router, which module will help me. Please provide some inputs.
  • How can we implement this feature in AngularJs? Any standard way to develop such feature?

Regards, Pradeep

zilcuanu
  • 3,451
  • 8
  • 52
  • 105
  • I do not see the nested views in your description, from what you describe I can see one area that you want to change with routing (the search results and even that seems a bit strange to use routing for..), so the normal ngRoute should work fine for you. ngRoute is tied to a specific element on your page and that element will change according to the route, the rest of the page will be static. – Rickard Staaf Oct 27 '14 at 06:28
  • I have to mention one more point here. The search bar and the results view are themselves a partial loaded from ng-route. Hence, using ng-route will not be appropriate here. – zilcuanu Oct 27 '14 at 06:31
  • Ok, that explains the nesting! Just one more question, do you really need the search result to be a view/partial in it's own? A directive seems to be the obvious choice here. – Rickard Staaf Oct 27 '14 at 06:34
  • So do you mean say to use the normal ng-route and load the partial containing the search bar and the the results on entering the keywords? Is this is good design? – zilcuanu Oct 27 '14 at 06:56

0 Answers0