filmov
tv
How to create component in angular 7 || Visual Studio Code ||Swapnil Thaware

Показать описание
Instagram: swapnil_g_thaware
Description of this video:
#Angular #7 #Components
The most basic building block of your Angular 7 application and this is a concept that's not new is the component. A component consists of three primary elements:
The #HTML template
The #logic
The #styling
Here, because this is a component, we're importing Component from the @angular/core library, and then it defines what's called a @Component decorator, which provides configuration options for that particular component.
As you can see, it's referencing the location of the HTML template file and the CSS file with the templateUrl property and the styleUrls property.
The logic of the component resides in the class at the bottom. As you can see, the CLI starter template simply defines a single property called title.
Let's use the Angular CLI to create our own components that we'll need going forward. In the console, issue the following commands:
ng generate component nav
// output
ng g c about
// output
ng g c contact
// output
ng g c home
// output
=====================================================
Do reach out to me on
GMAIL:
INSTAGRAM:
swapnil_g_thaware
FACEBOOK:
SKYPE:
swapnilgthaware
Description of this video:
#Angular #7 #Components
The most basic building block of your Angular 7 application and this is a concept that's not new is the component. A component consists of three primary elements:
The #HTML template
The #logic
The #styling
Here, because this is a component, we're importing Component from the @angular/core library, and then it defines what's called a @Component decorator, which provides configuration options for that particular component.
As you can see, it's referencing the location of the HTML template file and the CSS file with the templateUrl property and the styleUrls property.
The logic of the component resides in the class at the bottom. As you can see, the CLI starter template simply defines a single property called title.
Let's use the Angular CLI to create our own components that we'll need going forward. In the console, issue the following commands:
ng generate component nav
// output
ng g c about
// output
ng g c contact
// output
ng g c home
// output
=====================================================
Do reach out to me on
GMAIL:
INSTAGRAM:
swapnil_g_thaware
FACEBOOK:
SKYPE:
swapnilgthaware
Комментарии