Reusing components in other components in Nativescript Angular


#1

I want to use a component within another component. Something like this:

<StackLayout>
	<user></user>
</StackLayout>

I import user component within about component:

import { UserComponent } from "./../user/user.component";

My user component:

<StackLayout orientation="horizontal"
    ios:horizontalAlignment="center"
    android:horizontalAlignment="center">
    <Label text="This is a user component. We want to use it into another component."  class="action-label"></Label>
</StackLayout>

But it doesn’t show that part. (I mean <user></user>)

NOTE: I’m using router.
Any idea?


#2

I was forgotten to add the UserComponent in @NgModule.