I want to create an external module and then import it into my project.
I am creating a simple module (widget.module.ts) that has a component (widget.component.ts), so I am creating a package.json file with npm
npm init --scope=@mylibs
npm install
npm link
then i create a simple application
ng new MySimpleApp
on the way MySimpleApp I will contact my module
npm link @mylibs/widget
but when i run my application
ng serve
I have this error:
'WidgetModule' imported by the AppModule module. Add the @NgModule annotation.
source
share