Skip to content

Import component in app Component #423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
GuillaumeUnice opened this issue Apr 12, 2016 · 3 comments
Closed

Import component in app Component #423

GuillaumeUnice opened this issue Apr 12, 2016 · 3 comments

Comments

@GuillaumeUnice
Copy link

Hi every,

I install angular-cli and i create a new project. All it's right but when I begin to add a component I juste make :
ng g component myComponent

First bug : spec file generated import :
import {MyComponent} from './my-component';
instead of
import {MyComponent} from './myComponent';

Then, I juste want to import myComponent in app Component so I write in my app Component ts :
import {MyComponent} from './myComponent/myComponent';

and in @component I add :
directives: [ROUTER_DIRECTIVES, MyComponent]

And in app Component template html I add :
<my-component></my-component>

That compile there is no error but app Component HTML tag it's not interpreted so I have just : "loading..."

So, could you explain me how import a component in app Component?

Thanks a lot :D

@Brocco
Copy link
Contributor

Brocco commented Apr 12, 2016

Please you take a look in the browser's console for errors to share then and report the version of the CLI you're using

@GuillaumeUnice
Copy link
Author

In fact the problem was what I have mentionned the camelCase rules in not respect all
this issue is the same : #424

Thanks a lot

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants