Comments (2)
Update on this. I realized belatedly that just moving where the UMD bundles are physically located relative to the parent app doesn't change the fact that they're still loaded over http. So i get the same result (above) whether the modules live under the parent app's filesystem or if they're hosted somewhere else. So my issue is starting to sound more like #9.
The only think I can tell that is different about how I approached this is that my module library was not built with --prod because that option is not valid for library projects, only for application projects. Or more precisely, when that flag is passed the compiler looks for the standard environment config files which don't exist for a library project. What am I missing?
from angular-umd-dynamic-example.
Hi,
I came across the same issue playing with this - My solution was to import the Angular module I needed in my library's module.ts
as usual:
import {FormsModule} from '@angular/forms';
Doing just this will result in the 404 you mention, you must also add it to the Module loader service (module.service.ts
):
import * as AngularRouter from '@angular/router';
import * as AngularForms from '@angular/forms';
...
SystemJS.set('@angular/router', SystemJS.newModule(AngularRouter));
SystemJS.set('@angular/forms', SystemJS.newModule(AngularForms));
Hope this helps you.
from angular-umd-dynamic-example.
Related Issues (20)
- Sharing data between two modules. HOT 3
- Modules not loading when building with --prod HOT 4
- Refresh not working on routes HOT 2
- Not working with angular 7
- Does this work in IE 10?
- How to pass data from parent modules to dynamic lazy loaded module. HOT 2
- shared service at module level
- @NgModule static forRoot when implementing compileModuleAndAllComponentsAsync
- Unexpected value 'zt' imported by the module umd module when running Angular application with '--prod' flag HOT 4
- Love your concept HOT 2
- Error types.d.ts TS1005 ';' expected - stuck at eval HOT 3
- Ivy compatibility HOT 3
- Updating project to Angular 8 and ivy
- Import module in dynamic loaded modules HOT 11
- I have a Angular 9 update! It works. HOT 16
- Is there a Non SystemJS based version of this
- Error: Unexpected value 'undefined' imported by the module 'sampleModule HOT 2
- it can't run in production mode. HOT 7
- Bundling Third-Party Dependencies In Library HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-umd-dynamic-example.