What is different between ng routing and ui routing in angularjs?



What is different between ng routing and ui routing in angularjs?..

Answer / Raghubir Singh Tomer

NG Routing (Angular 1) and UI Routing (a third-party library for Angular 1) both provide routing functionality but they have some differences.
1. Syntax: NG Routing uses the $routeProvider service while UI Routing uses the $stateProvider service.
2. Route Parameters: NG Routing supports route parameters using the :param syntax, while UI Routing supports them with @ parameter.
3. Dependency Injection: NG Routing is built into AngularJS and follows its DI mechanism, whereas UI Routing requires a separate dependency on ui-router.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

What are guards in angular 2?

1 Answers  


What are the new features in angular 4?

1 Answers  


What is property in angular?

1 Answers  


What is the best way to declare and access a global variable in angular 2?

1 Answers  


What is linking function?

1 Answers  


What are Directives in AngularJS?

1 Answers   SLK Software,


How can observable objects be defined as?

1 Answers  


What is isolate scope in angularjs and why it is required?

1 Answers  


What is $timeout in angularjs?

1 Answers  


How to implement http cache using interceptors in angular 4?

1 Answers  


What is ecmascript ?

1 Answers  


How do you share data between controllers?

1 Answers  


Categories