Angular (web framework): Difference between revisions
No edit summary |
|||
Line 37: | Line 37: | ||
* [https://angular.io/tutorial Official Angular Tutorial] | * [https://angular.io/tutorial Official Angular Tutorial] | ||
** Teaches you to build a simple Tour of Heros app in less than 1 hour. | ** Teaches you to build a simple Tour of Heros app in less than 1 hour. | ||
* [https://angular.io/guide/cheatsheet Official Angular Cheat Sheet] |
Revision as of 02:45, 15 August 2020
Angular is a web framework by Google which allows you to create progressive web apps (PWAs).
It can also be used to create native mobile or desktop apps.
Getting Started
See Angular Guide Setup Local.
- Install NodeJS and npm
- Install the Angular CLI:
npm install -g @angular/cli
Usage
Deployment
The basic idea is to do the following:
- Create a production build:
ng build --prod
- Copy the dist folder to the server.
- Redirect missing files to index.html.
Apache
Place the following in the apache config for your site or in an .htaccess
file:
Rewrite Rules
RewriteEngine On # If an existing asset or directory is requested go to it as it is RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -f [OR] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} -d RewriteRule ^ - [L] # If the requested resource doesn't exist, use index.html RewriteRule ^ /index.html
Resources
- Official Angular Tutorial
- Teaches you to build a simple Tour of Heros app in less than 1 hour.
- Official Angular Cheat Sheet