filmov
tv
What is Angular CLI
Показать описание
If you are a foodie like me, I am sure you will enjoy the recipes on my friend's YouTube channel. If you find them useful, please subscribe and share to support her. She's really good at what she does.
In this course we will learn
1. What is Angular CLI
2. Why should we use Angular CLI and the benefits it provide
Before watching this course I strongly recomend to watch our Angular 2 tutorial for beginnners course in which we have discussed all the basics of Angular. Once you have a good understanding of the angular basics, it will be easy for you to get the most out of this Angular CLI course.
Here is the link for Angular 2 course
First let's understand why should we use Angular CLI and what problems it solves.
If you have any experience with Angular, then you already know manually setting up an Angular application from scratch is a laborious and time consuming process. We have to
2. Install the packages using NPM
3. Create the root application component (i.e AppComponent) as every angular application should have atleast one component which is the root component. This root component bootstraps the angular application.
4. Create the root application module (AppModule) as every angular application should have atleast one module which is the root module
You have to manually write all the boilerplate code yourself, which is not only monotonous but also time consuming. If you have an inline view template and inline styles for your component, then it is enough if you just create the TypeScript component class file. But if you have lot of HTML and styles, then for maintainability and separation of concerns, you want your HTML to be in a separate template file and your styles in a separate stylesheet. In this case you will have to manually create the HMTL template and CSS files as well in addition to the component class file.
In a real world application, we will have many components. Just imagine the amount of time we have to spend to create these different component files and the same boilerplate code. In an Angular application, in addition to components, we also have directives, pipes, services etc. Again imagine the amount of time it takes to create that same boilerplate code for all these.
In a real world, we usually have more than one developer working on a given angular project. While all these developers are creating these different files and writing the required boiler plate code, are they following the angular teams best practices and conventions. What if the developers are not following them. How do we enforce them. Well, one way to enforce these is by manual code reviews. Code reviews are not only time consuming but also error prone.
The other option is to have some tooling in place to address this. Angular CLI is such a tool. It help us create angular applications, components, modules, pipes, directives, services and much more with great speed and consistency while still following the angular teams best practices and conventions.
What is Angular CLI
CLI stands for Command Line Interface. So Angular CLI is command line tool the help us
1. Create Angular applications faster and with great consistency
2. Create the boiler plate code for angular features like components, directives, pipes, services etc.
3. Create boiler plate code for TypeScript features like classes, interfaces, enums etc.
4. It follows angular best practices and conventions out of the box
5. Run Unit and End-to-End (e2e) tests
6. Create optimised builds for deployment to production
We will see all these in action in our upcoming videos.
In our next video, we will discuss installing Angular CLI
Text version of the video
Slides
Angular CLI Tutorial
Angular CLI Text articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
In this course we will learn
1. What is Angular CLI
2. Why should we use Angular CLI and the benefits it provide
Before watching this course I strongly recomend to watch our Angular 2 tutorial for beginnners course in which we have discussed all the basics of Angular. Once you have a good understanding of the angular basics, it will be easy for you to get the most out of this Angular CLI course.
Here is the link for Angular 2 course
First let's understand why should we use Angular CLI and what problems it solves.
If you have any experience with Angular, then you already know manually setting up an Angular application from scratch is a laborious and time consuming process. We have to
2. Install the packages using NPM
3. Create the root application component (i.e AppComponent) as every angular application should have atleast one component which is the root component. This root component bootstraps the angular application.
4. Create the root application module (AppModule) as every angular application should have atleast one module which is the root module
You have to manually write all the boilerplate code yourself, which is not only monotonous but also time consuming. If you have an inline view template and inline styles for your component, then it is enough if you just create the TypeScript component class file. But if you have lot of HTML and styles, then for maintainability and separation of concerns, you want your HTML to be in a separate template file and your styles in a separate stylesheet. In this case you will have to manually create the HMTL template and CSS files as well in addition to the component class file.
In a real world application, we will have many components. Just imagine the amount of time we have to spend to create these different component files and the same boilerplate code. In an Angular application, in addition to components, we also have directives, pipes, services etc. Again imagine the amount of time it takes to create that same boilerplate code for all these.
In a real world, we usually have more than one developer working on a given angular project. While all these developers are creating these different files and writing the required boiler plate code, are they following the angular teams best practices and conventions. What if the developers are not following them. How do we enforce them. Well, one way to enforce these is by manual code reviews. Code reviews are not only time consuming but also error prone.
The other option is to have some tooling in place to address this. Angular CLI is such a tool. It help us create angular applications, components, modules, pipes, directives, services and much more with great speed and consistency while still following the angular teams best practices and conventions.
What is Angular CLI
CLI stands for Command Line Interface. So Angular CLI is command line tool the help us
1. Create Angular applications faster and with great consistency
2. Create the boiler plate code for angular features like components, directives, pipes, services etc.
3. Create boiler plate code for TypeScript features like classes, interfaces, enums etc.
4. It follows angular best practices and conventions out of the box
5. Run Unit and End-to-End (e2e) tests
6. Create optimised builds for deployment to production
We will see all these in action in our upcoming videos.
In our next video, we will discuss installing Angular CLI
Text version of the video
Slides
Angular CLI Tutorial
Angular CLI Text articles & Slides
All Dot Net and SQL Server Tutorials in English
All Dot Net and SQL Server Tutorials in Arabic
Комментарии