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 generatejs 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-clithen 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.
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 errorError: No NgModule metadata found for 'undefined'
to load the module. The scenario where I am getting error is, I developed some plugins withcomponent, module and service
, then build thetypescript
files to get theJS files
and import...module.js
file usingimport()
method. In that case, it is not working. But whenever I am using typescript plugins withangular-cli
then it works fine. How can I import externalJS
module by avoiding the mentioned error? Thanks.