How it works...

By setting the path as **, we will catch any route that is not first served by the routes defined above this wildcard route configuration. We then direct the user to a new component we generated with ng g component page-not-found to serve the user a 404 message informing them that the page they have attempted to reach is not available.

Get MEAN Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.