Build with Angular
Create an Angular app from an Azion template, a GitHub repository, or the Azion CLI, and deploy it to an Azion domain.
You can put an Angular app on Azion in three ways: deploy a template from Azion Console, import your GitHub repository, or use the Azion CLI. Each route finishes with the app live on an Azion domain.
Azion serves an Angular app as a static application. The ng build step writes the compiled app to ./dist, the deploy copies that folder into a storage bucket, and an application delivers it. To see which other frameworks Azion builds, refer to Frameworks compatibility.
Prerequisites
Console
- An Azion account. To create one, refer to Create an account.
- Access to Azion Console. To sign in, refer to How to access Azion Console.
- A GitHub account, which the template form connects when it asks for one.
Angular templates
An Angular template is a complete starter project that Azion builds and deploys for you. In the Console route, you pick one of these:
| Template | Use |
|---|---|
| Angular Boilerplate | Starter project |
| Angular with ButterCMS Starter Project | Starter project |
Angular Boilerplate has a guide of its own, linked in the table. For more information on the other template, refer to Azion Marketplace. In the CLI route, the template picker of azion init shows every template of the Angular preset.
Deploy the app
Every route builds the Angular project and creates the Azion resources that serve it. Use the panel that matches the route you chose:
Console
To deploy an Angular template from Azion Console:
Access Azion Console > Create > Templates.
In Search by name, framework, or keyword, enter Angular.
If the form shows GitHub Connection, select Connect with GitHub and install the Azion GitHub App.
In Git Scope, select the scope for the template.
The deploy page opens with the Deploy Log, which follows the build. On success, the page shows Successfully created!, the domain URL, and a Manage button that opens the application.
Check the site
Each route ends with the URL of the app’s Azion domain, shaped like https://xxxxxxxxxx.map.azionedge.net. The Console deploy page shows the URL, and azion deploy prints it as its last step. Open the URL in a browser to load the Angular app.
The first deploy can take several minutes to answer from every location; later deploys take about two minutes. A location that has not received the app yet returns a 404 page with the text There's nothing here yet. When you get that page, wait, then request the URL again.