What is the top advantages of using UI-router over ngRoute?

0 votes
How UI-Router become more flexible than ngRoute and what are the service provided by UI-Router than is not provided by the ngRoute?
Feb 11 in Angular by kartik
• 10,760 points
71 views

1 answer to this question.

0 votes

Hey,

In Client side Routing there are several way of achieving Routing but the common one is: 

  •  ngRoute
  • UI-Router

Both the router provides the routing concept but most of the developer using the UI-Router because of the having more flexibility and provide more feature and capability than ngRoute.

  • UI-Route is build by Angular team.
  • It fully replace ngRoute and is more powerful  than ngRoute
  • It is developed around the state which is opposed to ngRoute
In Short we can say that UI-Route describes how the UI looks like when navigation occur or when a route is triggered or when we switched to different route.
So We can have the most important advantages of UI-Router over ngRoute as follow:
  1.  Multiple views:  There is no support for multiple view in  ngRoute. You should always work with only one ngView which you need to replace forever and nesting of ngview is quite so complicated but not impossible but in case of UI-router you can have multiple view sitting together in parallel or nested them to any numbers of levels.
  2. Nested state: When you are defining the state it is just not limited to a particular state, you can further enhanced that state to children as well in UI-Router but the state concept is not available in ngRoute.
  3. Association : In UI-Router there is availability of association between controller/scope to nested state/ views but this is not in case of ngRoute.
Thank you!!
answered Feb 11 by anonymous
• 21,680 points

Related Questions In Angular

0 votes
1 answer

What is the difference between Routing using resolve and without using it?

There is not much difference between routing ...READ MORE

answered Feb 10 in Angular by anonymous
• 21,680 points
27 views
0 votes
1 answer

What is UI-Router in AngularJs?

Routing is just another way of fixing some content ...READ MORE

answered Feb 11 in Angular by anonymous
• 21,680 points
32 views
0 votes
1 answer

What are the features supported in UI-Router Parameters?

UI-Route describes how the UI looks like ...READ MORE

answered Feb 11 in Angular by Niroj
• 21,680 points
43 views
0 votes
1 answer

What are the type of $watch()?

hey kartik, Before you move in to the ...READ MORE

answered Feb 3 in Angular by Niroj
• 21,680 points
49 views
+1 vote
1 answer

What is the relationship between angularjs Scope with controller/view?

Let us consider the below block: <div ng-controller="emp"> ...READ MORE

answered Jan 20 in Web Development by Niroj
• 21,680 points

edited Jan 21 by Niroj 67 views
+1 vote
1 answer

What is css box module?

Hey, All the element present in html follows ...READ MORE

answered Jan 20 in Web Development by Niroj
• 21,680 points

edited Jan 21 by Niroj 53 views
0 votes
1 answer

Explain the difference between visibility:hidden; and display:none?

hii, visibility:hidden; and display:none are totally different used ...READ MORE

answered Jan 20 in Web Development by Niroj
• 21,680 points
349 views
+1 vote
1 answer

How to access the Angularjs scope of a particular html element from our console?

Hello, You should follow the below steps:-- 1.Compile and ...READ MORE

answered Jan 21 in Web Development by Niroj
• 21,680 points

edited Jan 21 by Niroj 52 views
0 votes
1 answer

What is the service that is used to configure the UI-Router and ngRoute in AngularJs?

Routing comes into play whenever you want ...READ MORE

answered Feb 11 in Angular by anonymous
• 21,680 points
25 views
0 votes
1 answer

What is the use of $eval in alert()?

Hey, kartik!! There is not much difference in ...READ MORE

answered Feb 4 in Angular by Niroj
• 21,680 points
50 views