O'Reilly logo

Angular Test-Driven Development - Second Edition by Md. Ziaul Haq

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Walk-through of Angular routes and navigation

This walk-through will leverage Angular routes. Routes are an extremely useful feature of Angular, as they were in Angular 1.x before it, but more powerful. They allow us to control certain aspects of the application using different components.

This walk-through will flip between components to show us how to use TDD to build routes. The following are the specifications. There will be a navigation menu, which has two menu items, View1 and View2:

  • In the navigation menu, click on label View1
  • The content area (router outlet) will load/flip View1 content

And here's the second part:

  • In the navigation menu, click on label View2
  • The content area (router outlet) will load/flip View2 content

Essentially, this will ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required