Simplifying Routing in AngularJS

Usually AngularJS is used to create a single page application with multiple views. But we can create multiple views in an AngularJS-based single page application by using routing – and in this post we’ll learn how to do that!

What is Routing?

Routing allows us to logically divide the application in the multiple logical views to be loaded asynchronously. Let’s take, for example, a single page Product application. We can break the various tasks that can be performed on that product into separate logical views as shown below,

  • · View to add a product
  • · View to delete a product
  • · View to edit a product
  • · View to display the products.

In AngularJS routing, each view has its own URL. For example, the four views of a single page product application as listed above may have URLs as shown below:

Read full article on the Infragistics blog

One thought on “Simplifying Routing in AngularJS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s