1

I have an Angular application which has the following structure

|— src
    |— app
        |— user
            |— collection
                |— collection.component.html
                |— collection.component.scss
                |— collection.component.ts
            |— user.component.html
            |— user.component.scss
            |— user.component.ts
    ...

How can I point to the collection component right from the user component?

1
  • The IDE itself gives autosuggestion. I hope you are using visual studio code Commented Sep 22, 2019 at 8:26

2 Answers 2

1

Use the selector tag of the connection component inside the template of the user component.

If the connection component takes any @Input parameters, then make sure to provide them when using it inside another component.

Note - this works if both the components are declared in the same module

You can refer to this video tutorial.

Sign up to request clarification or add additional context in comments.

Comments

0

In your user.component.ts, you can

import { CollectionComponent } from './collection/collection.component'

2 Comments

then how will i use it
@YogeshDeveloper Looks like you need to go a long way before getting answer to this question. Try learning angular through an online course and the answers will unfold automatically.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.