Angular offers the following benefits:
- Revealing Pattern Module: organizes the code into one or more modules and gives a better structure.
- Clean and structured architecture.
- Reusable code.
- Application more easily testable.
- Front-End: Takes care of the presentation logic. Made up of HTML / CSS / TypeScript / Angular
- Backend: Takes care of business logic. Made up of Data – API
Create a first Angular app:
Node Package Manager: This is an online control utility that facilitates the installation of packages, version management and dependency management.
Angular-Cli: a command line interface to automate your development workflow. It allows you to:
- Create a new Angular app.
- Run a development server with "Live Reload" support to preview your app during development.
- Add features to your Angular app.
- Run unit tests
- Run end-to-end tests
- Build the app for deployment in production
- Deploy your app to a server
Installing Angular-cli online ordering:
npm install -g @angular-cli
This notation with 'NPM' allows nPM packages to be spaced out of names. Each user and organization on NPM has its own reach and they are the only ones who can add packages.
This is useful for several reasons:
- Allows organizations to clearly state which packages are "official" and which are not. For example, the scope @angular, ensures that it was published by the Angular core team.
- The name of the package should be unique to within its scope of publication but not to the entire npm registry.
For example, the name of the http package is already taken in the main repository npm, but Angular may also have angular/http.
For more details the documentation can be found at this link: https://docs.npmjs.com/
Create an Angular package:
ng new package-test-angular
Edit the code of the Angular project created:
If you use vscode the following command can be used at the root of your project.
Deploy your angular project on the local machine server:
The app is then searchable on localhost:4200.