GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing angular.dev — Generating code using schematics • Angular A schematic is a template-based code generator that supports complex logic. It is a set of instructions for transforming a software project by generating or modifying code. Schematics are packaged into collections and installed with npm. The schematic collection can be a powerful tool for creating, modifying, and maintaining any software project, but is particularly useful for customizing Angular projects to suit the particular needs of your own organization. You might use schematics, for example, to generate commonly-used UI patterns or specific components, using predefined templates or layouts. Use schematics to enforce architectural rules and conventions, making your projects consistent and interoperative. Schematics for the Angular CLISchematics are part of the Angular ecosystem. The Angular CLI uses schematics to apply transforms to a web-app project. You can modify these schematics, and define new ones to do things like update your code to fix breaking changes in a dependency, for example, or to add a new configuration option or framework to an existing project. Schematics that are included in the
Configuring CLI schematicsA JSON schema associated with a schematic tells the Angular CLI what options are available to commands and sub-commands, and determines the defaults. These defaults can be overridden by providing a different value for an option on the command line. See Workspace Configuration for information about how to change the generation option defaults for your workspace. The JSON schemas for the default schematics used by the CLI to generate projects and parts of projects are collected in the package Developing schematics for librariesAs a library developer, you can create your own collections of custom schematics to integrate your library with the Angular CLI.
For more details of what these look like and how to create them, see: Add schematicsAn add schematic is typically supplied with a library, so that the library can be added to an existing project with For example, the Partner and third party libraries also support the Angular CLI with add schematics.
For example, An add schematic can also update a project with configuration changes, add additional dependencies (such as polyfills), or scaffold package-specific initialization code.
For example, the Generation schematicsGeneration schematics are instructions for the Angular Material, for example, supplies generation schematics for the UI components that it defines.
The following command uses one of these schematics to render an Angular Material
Update schematicsThe
If you pass the command a set of libraries to update, it updates those libraries, their peer dependencies, and the peer dependencies that depend on them. HELPFUL: If there are inconsistencies (for example, if peer dependencies cannot be matched by a simple semver range), the command generates an error and does not change anything in the workspace. We recommend that you do not force an update of all dependencies by default. Try updating specific dependencies first. For more about how the If you create a new version of your library that introduces potential breaking changes, you can provide an update schematic to enable the For example, suppose you want to update the Angular Material library.
This command updates both |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |