-2

I am working on huge project, initially we used $routeProvider, but now we are thinking to use $stateProvider.

I have idea for both $routeProvider and $stateProvider.

I'm looking for best way to migrate.

Thanks in advance.

Vivz
  • 6,625
  • 2
  • 17
  • 33

1 Answers1

1

for better flexibility with various nested view with states, I'd prefer you to go for ui-router

please go through the link attached

$routeProvider VS $stateProvider

Ashkar Km
  • 128
  • 1
  • 9
  • $stateprovider is used when you want the app to have different states like if you want jst a small section of a screen to be loaded at times instead of the entire screen, the go for State provider and the $state.go(url). $routeProider are commonly used for small projects. Mostly when you want the entire screen to be changed and redirected to a new one.While using the $state.go(url); for redirecting your screen, the real link of your screen won't change. It will just change the state and not the url of the page – Ashkar Km Aug 07 '17 at 12:34