your recipe card header background

    Angular Route Path Default



    Jose Romero

    Angular TypeScript Recipes

    The first line declares a path variable, which will store the full path to the file or directory we are working with. The second line tells the router that the path should be matched in full, and if it isn't then the router should redirect us to the path we specified. The final line tells the router to redirect us to the path defined in pathMatch.

    Library: angular

    Shortcut: angular.routes.path.default

    { path: '', pathMatch: 'full', redirectTo: 'path' },
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.