I have made a custom angular2(5.0.x) module that looks like this :
import { GuageService } from \'./services/guage.service\';
import { NgModule } from \'@angular
This is most likely an issue with the way your npm package is being created. In your package.json for your GuageModule
are you defining a main? This should point to the entry point to your npm package. Here is an example of mine.
"main": "./dist/module.js",
Then if you want typings from GuageModule in your main app you'll need to go to your tsconfig.json
and under compilerOptions
set declaration
to be true to generate the typings files.
"compilerOptions": {
...
"declaration": true
...
},
Then finally in your package.json
you will need to point to the entry point for your typings file.
"types": "./src/app/layout.module.d.ts"
Now you should be able to import your module and have typings on the module that you imported. Hope this helps!