Create Component Angular
#angular #angulartutorial #learnangular #createcomponent #createangularcomponent #angularcomponent #angularcli
In the last video, we have created an Angular project,
Now we will see how to create a component in angular.
Inside src, we have an app and then app.component.html, app.component.SCSS and app.component.ts
We also have app.module.ts and app.routing.module.ts
In routing.module.ts we have routes where we define our routes, We will learn routing in our next video.
We have an assets folder where we keep our images and other media things.
then we have environment.ts where we define the environment URLs.
let's go to app.component.html,
open the terminal to create a component we will run the command ng g c component/home
This will create a home component that consists of
Home.component.html
home.compontn.scss
home.component.ts
And it will update our app.module.ts with a new home component entry in it.
Let's open app.component.html and remove all the default HTML
To add the home component here in app.component.html we will write a tag
app-home
this is the selector for the home component
also, let's create one h1 tag with text this is the home component
press ctrl s to save let's check on the browser
as you can see we have home works as a home component
and the h1 tag text
Let's try to change the text inside the home component
create h1 tag with text I am home component
as you can see content in the home component gets updated.
---------------------------------------------------------------------------------------------------
Facebook page: / angular11tutorial
YouTube Channel: / @nscode
Email: abdulrazzakshah786@gmail.com
Angular docs: https://angular.io/
--------------------------------------------------------------------------
Credit:
Music: Dreams - Bensound
https://www.bensound.com
Support by RFM - NCM: https://bit.ly/2xGHypM
На этой странице сайта вы можете посмотреть видео онлайн Create Component Angular | Component In Angular | Angular Tutorial | NSCODE длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь NSCODE 30 Июнь 2021, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 268 раз и оно понравилось 0 зрителям. Приятного просмотра!