9

Previously, I was using ngRoute in my main controller. I have to create child view functionality and it is only achieved by UI-Router. please suggest?

Radim Köhler
  • 122,561
  • 47
  • 239
  • 335
Harsh Bhalodia
  • 153
  • 1
  • 2
  • 9

2 Answers2

2

Yes you can use both.

var myModule = angular.module("myModule", ["ui.router", "ngRoute"]);
Suneet Bansal
  • 2,664
  • 1
  • 14
  • 18
2

Yes, you can use ngRoute/angular-route ($routeProvider) and ui-router ($stateProvider) together (in particular, the second inside of the first). Check this repo's master to find the example. In a couple of words, the ui-router in this case will have the possibility to provide navigation and nested states/views inside of "ng-view-provided space". I have answered almost the same question with more details and pros/cons at Quora

Fyodor
  • 247
  • 3
  • 14