Introduction
The Ui-Router is a routing framwork for Angularjs built by the AngularUi team.
It provides a different approach than ngRoute in that it changes your application views based on state of the application and just the route URL.
Difference between States and URL routing
1.With State routing our views not tied with url, but we can switch to different views without changing the site url.
2.When use ngRoute we can use ngInclude and others methods to perform these operation and this could get confusing.
Now with the help of .config() , we can handled all of our states, routing, and views.
Setup of Application using UI-Routing
step-1 import the cdn of ui-route in our index.html file
step-2 Render the file using ui-view.
------------------------code here-------------------------------------
for example: <div ui-view></div>
More From Oodles
Ready to innovate? Let's get in touch
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Pankaj Kumar Thakur
Pankaj is a MEAN stack developer and expertise in Front-End for web application using Angulajs,Angularjs2/4 with Framework Ionic,Bootstarp,Javascript and Html5 css3, Singing and Reading are includes in his Hobbies.