question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Broken example for adding ProductAlertsComponent

See original GitHub issue

Description

Broken step in the ‘Pass data to child component’ section of the getting started guide. In order to fix this, I had to modify app.module.ts to import the additional component. Perhaps this is something that stackblitz.com used to do automatically when using the Angular Generator.

I added:

added line 9: import { ProductAlertsComponent } from ‘./product-alerts/product-alerts.component’; changed line 22: ProductListComponent --> ProductListComponent, (added a comma) added line 23: ProductAlertsComponent

What is the affected URL?

https://angular.io/start

Please provide the steps to reproduce the issue

I followed the steps under ‘Pass data to child component’ where during step 6 the example breaks.

Please provide the expected behavior vs the actual behavior you encountered

No response

Please provide a screenshot if possible

No response

Please provide the exception or error you saw

Error in src/app/product-list/product-list.component.html (21:3)
'app-product-alerts' is not a known element:
1. If 'app-product-alerts' is an Angular component, then verify that it is part of this module.
2. If 'app-product-alerts' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

Is this a browser-specific issue? If so, please specify the device, browser, and version.

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
JoeKrupinskycommented, Aug 7, 2021

I managed to get past this by adding ProductAlertsComponent to the declarations in app.module.ts after some googling. image

NOTE: You may need to reload the page after adding the declaration

0reactions
angular-automatic-lock-bot[bot]commented, Sep 30, 2021

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do you add / remove notification subscriptions from a ...
I'm using this Angular notification example as a service so that alerts from my .Net backend system can be viewed across the entire...
Read more >
Lesson 1: Using JavaScript to Show an Alert
In this lesson, you will use JavaScript to display an alert after the web ... One way to do that is to add...
Read more >
Building an Alert Component in Svelte - ryanfiller.com
I needed such an alert to warn users that there's most likely unexpectedly broken code in the “lab” section of my site.
Read more >
Bootstrap 4 Alerts Guideline - examples & tutorial.
Bootstrap alerts are feedback messages which are displayed after specific actions preceded by the user. Length of the text is not limited.
Read more >
ion-alert: Ionic API Alert Buttons with Custom Message Prompts
For example, an alert could have all radio button inputs, or all checkbox inputs, but the same alert cannot mix radio and checkbox...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found