I am currently working on a project that is utilizing ng-metadata
for creating a few Angular 1.5 modules. One of the test modules/components in this project has the following structure:
import { NgModule, Component, Inject, Input, Output, EventEmitter } from 'ng-metadata/core'
import { platformBrowserDynamic } from 'ng-metadata/platform-browser-dynamic'
@Component({
selector: 'test',
template: require('./test.template.html')
})
class TestComponent {
@Input() type: string;
constructor() {
console.log(`test: ${this.type}`)
}
}
@NgModule({
declarations: [TestComponent]
})
class HeroModule {}
platformBrowserDynamic().bootstrapModule(HeroModule)
After successful compilation, I am now trying to incorporate this module into another project that does not utilize ng-metadata
, but supports a compatible version of Angular.
Following the instructions provided by ng-metadata
documentation, I have included the necessary shims and the JavaScript file containing the aforementioned module (generated via webpack). In my new project, I have created a separate module which needs to include the HeroModule
as a dependency. However, my attempts have so far resulted in an
Error: $injector:nomod Module Unavailable
error being thrown by Angular.
If I am using ng-metadata
for constructing my modules, what specific names should I use when listing them as dependencies in a different project?