Error: No NgModule metadata found for 'undefined' for typescript converted js file
khaled-ansary opened this issue · comments
Hi,
I am able to load module dynamically using import() method for angular modules in developing mode where I used typescript. i.e. when modules are written in typescript its working fine. Then I tried it in production mode and build all my typescript and generate js bundle
and load it into web server. In that case it is not working and I am getting the following error Error: No NgModule metadata found for 'undefined'
to load the module.
The scenario where I am getting error is, I developed some plugins with component, module and service
, then build the typescript
files to get the JS files
and import ...module.js
file using import()
method. In that case, it is not working. But whenever I am using typescript plugins with angular-cli
then it works fine. How can I import external JS
module by avoiding the mentioned error? Thanks.
@khaled-ansary That seems like it is an Angular specific build issue. I would check with the angular-cli team. This repo is to discuss the specification.
Indeed.