How do we work with UI-Router in AngularJS

0 votes
I want to know what are the steps to be followed in order to work with UI-Router in AngularJS?
Feb 11, 2020 in Angular by kartik
• 37,510 points
486 views

1 answer to this question.

0 votes

Hello @kartik,

 As you know Ui-Router is more flexible and provide more features than ngRouter, so there is a bit different in working with UI-Router for which you can follow the steps below:

1. Include Ui-Router module.

    

2. Use UI-Router as module dependency.

     var app= angular.module( 'app', ['ui-router']);

 3.Use $stateProvider to configure state and routes like:

       3.1 states

       3.2 Routinh URL(Location)

       3.3 Views 

       3.4 Controller associated with views

       3.5 Nested views/states

 4. Declare ui-view in order to inject(hold) the content(view). You can have multiple ui-view or nested view

      <div ng-view>

       </div>
answered Feb 11, 2020 by Niroj
• 82,880 points

Related Questions In Angular

0 votes
1 answer

How can we provide condition based on certain resolve result obtained in routing with resolve?

Hey,  Let me consider that you have some ...READ MORE

answered Feb 11, 2020 in Angular by Niroj
• 82,880 points
1,737 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, 2020 in Angular by anonymous
• 82,880 points
471 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, 2020 in Angular by anonymous
• 82,880 points
392 views
0 votes
1 answer

How compile, controller, pre-linking and post linking works in Angularjs?

Explanation of compile and link process don't ...READ MORE

answered Jan 31, 2020 in Angular by Niroj
• 82,880 points
1,194 views
0 votes
1 answer
0 votes
0 answers

Anyone can help me out to understand the semantic of (document.getElementBYId("demo").innerHTML="Hello") ?

Hello guys, Can Someone helps me to find ...READ MORE

Jan 17, 2020 in Web Development by anonymous
• 37,510 points
746 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, 2020 in Web Development by Niroj
• 82,880 points

edited Jan 21, 2020 by Niroj 799 views
+1 vote
1 answer

What are pseudo class in css??

Hey, The state of an element is controlled  by ...READ MORE

answered Jan 20, 2020 in Web Development by Niroj
• 82,880 points

edited Jan 21, 2020 by Niroj 679 views
0 votes
1 answer

How can we specify no route path in UI-Router?

hey @kartik, In order to route to any ...READ MORE

answered Feb 11, 2020 in Angular by anonymous
• 82,880 points
990 views
0 votes
1 answer

How can we achieve transclusion in AngularJs?

Hii,  In order to know what transclusion is ...READ MORE

answered Feb 5, 2020 in Angular by Niroj
• 82,880 points
460 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP