When using the application builder, a `loader` import attribute is now available for use with import statements and expressions. The presence of the import attribute takes precedence over all other loading behavior including JS/TS and any `loader` build option values. This allows per file control over loading behavior. For general loading for all files of an otherwise unsupported file type, the `loader` build option is recommended. For the import attribute, the following loader values are supported: * `text` - inlines the content as a string * `binary` - inlines the content as a Uint8Array * `file` - emits the file and provides the runtime location of the file Unfortunately, at this time, TypeScript does not support type definitions that are based on import attribute values. The use of `@ts-expect-error` or the use of individual type definition files (assuming the file is only imported with the same loader attribute) is currently required. Additionally, the TypeScript `module` option must be set to `esnext` to allow TypeScript to successfully build the application code. As an example, an SVG file can be imported as text via: ``` // @ts-expect-error TypeScript cannot provide types based on attributes yet import contents from './some-file.svg' with { loader: 'text' }; ``` When using the development server and a file that is referenced from a Node.js package with a loader attribute, the package must be excluded from prebundling via the development server `prebundle` option. This does not apply to relative file references.
Angular CLI - The CLI tool for Angular.
The Angular CLI is a command-line interface tool that you use to initialize, develop, scaffold,
and maintain Angular applications directly from a command shell.
Contributing Guidelines
·
Submit an Issue
·
Blog
Documentation
Get started with Angular CLI, learn the fundamentals and explore advanced topics on our documentation website.
Development Setup
Prerequisites
- Install Node.js which includes Node Package Manager
Setting Up a Project
Install the Angular CLI globally:
npm install -g @angular/cli
Create workspace:
ng new [PROJECT NAME]
Run the application:
cd [PROJECT NAME]
ng serve
Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.
Quickstart
Ecosystem
Changelog
Learn about the latest improvements.
Upgrading
Check out our upgrade guide to find out the best way to upgrade your project.
Contributing
Contributing Guidelines
Read through our contributing guidelines to learn about our submission process, coding rules and more.
Want to Help?
Want to report a bug, contribute some code, or improve documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.
Code of Conduct
Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.
Developer Guide
Read through our developer guide to learn about how to build and test the Angular CLI locally.
Community
Join the conversation and help the community.
Packages
This is a monorepo which contains many tools and packages:
Tools
Project | Package | Version | Links |
---|---|---|---|
Angular Build System | @angular/build |
||
Angular CLI | @angular/cli |
||
Architect CLI | @angular-devkit/architect-cli |
||
Schematics CLI | @angular-devkit/schematics-cli |
Packages
Project | Package | Version | Links |
---|---|---|---|
Angular SSR | @angular/ssr |
||
Architect | @angular-devkit/architect |
||
Build Angular | @angular-devkit/build-angular |
||
Build Webpack | @angular-devkit/build-webpack |
||
Core | @angular-devkit/core |
||
Schematics | @angular-devkit/schematics |
Misc
Project | Package | Version | Links |
---|---|---|---|
Angular Create | @angular/create |
||
Webpack Angular Plugin | @ngtools/webpack |
Schematics
Project | Package | Version | Links |
---|---|---|---|
Angular PWA Schematics | @angular/pwa |
||
Angular Schematics | @schematics/angular |
Love Angular CLI? Give our repo a star ⭐ ⬆️.