![]() ![]() You can use the -routing option with ng new to create a file when you create or initialize a project. The -routing option also generates a default component with the same name as the module. The file includes an empty Routes object that you can fill with routes to different components and/or modules. When you generate a module, you can use the -routing option like ng g module my-module -routing to create a separate file to store the module routes. ![]() Use whichever is appropriate for your project in the examples below. We include the NPM package when creating or initializing a project. link Step 1: Install Angular Material and Angular CDK You can use either the npm or yarn command-line tool to install packages. The CLI supports routing in several ways: You can find all possible blueprints in the table below: Scaffold # your component will be generated in src/app/newer-cmp
0 Comments
Leave a Reply. |