Skip to content
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

Broken ng serve auto-refresh #4511

Closed
cclow opened this issue Feb 8, 2017 · 1 comment · Fixed by #4542
Closed

Broken ng serve auto-refresh #4511

cclow opened this issue Feb 8, 2017 · 1 comment · Fixed by #4542

Comments

@cclow
Copy link

cclow commented Feb 8, 2017

OS?

Mac OSX Sierra (10.12.3)

Versions.

@angular/cli: 1.0.0-beta.30
node: 7.4.0
os: darwin x64
@angular/common: 2.4.6
@angular/compiler: 2.4.6
@angular/core: 2.4.6
@angular/forms: 2.4.6
@angular/http: 2.4.6
@angular/platform-browser: 2.4.6
@angular/platform-browser-dynamic: 2.4.6
@angular/router: 3.4.6
@angular/cli: 1.0.0-beta.30
@angular/compiler-cli: 2.4.6

Repro steps.

I'm running ng serve to use the live reload in my development.
If I create a new component, say with BoardComponent with selector app-board, and add the app-board element to a parent's template before I declare BoardComponent in the Module, I get an error in the browser complaining that "app-board is not a known element". Even if we now remove the element from the parent's template, the error does not go away.

  1. ng serve does not show any error, and restarting ng serve removes the browser error.
  2. This does not occur if I declare BoardComponent in the Module before I add the element to the parent's template.

This is a problem because it disrupts the development workflow.

The log given by the failure.

From browser console:

Unhandled Promise rejection: Template parse errors:
'app-board' is not a known element:

  1. If 'app-board' is an Angular component, then verify that it is part of this module.
  2. If 'app-board' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message.
@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 6, 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

Successfully merging a pull request may close this issue.

1 participant