You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I am not able to create a shared component which can be used in multiple views. Here is what I did
Created a separate component inside components folder and added this component in index files and app.module
I am trying to call that component from an HTML file which is inside a different module which is in views folder.
Here is the error I am receiving. Is that the right place to create a shared component? I did try creating a shared component inside views folder still no luck. Please suggest me where I am doing wrong. Thanks.
The text was updated successfully, but these errors were encountered:
I'm not sure, but components of app.module are not available to sub-modules. Have you tried to add the new component to your new component module, to declarations section?
Maybe you need a shared module to hold this: https://angular.io/guide/ngmodule#shared-modules
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions
Hi, I am not able to create a shared component which can be used in multiple views. Here is what I did
Here is the error I am receiving. Is that the right place to create a shared component? I did try creating a shared component inside views folder still no luck. Please suggest me where I am doing wrong. Thanks.
The text was updated successfully, but these errors were encountered: