#import component?

3 messages · Page 1 of 1 (latest)

buoyant vector
#

Hi i am a newbie, i just watch 3-4 videos about angular. I've been following the teacher's instructions but the videos that i watched were uploaded about 1 year ago and teacher's code is not working (because of some updates i think). I was learning property binding and i wanted to use "app-home" in app.component.ts i think i have to import home component but idk how to do it. Can you please help me? #questions

solemn halo
#

import HomeComponent into AppComponents' import array

vague burrow
#

Your component is a "stand-alone" component. (see the standalone: true property). Back then, there were module.ts files for managing imports. This type of components combine this approach in some way. So basicly you need to add your HomeComponent into your imports property of your AppComponent (like your RouterOutlet). This will work.

If you want to learn some more about angular (without watching old videos): https://angular.dev/tutorials (work through both tutorials)