GithubHelp home page GithubHelp logo

Comments (2)

lorenjerickson avatar lorenjerickson commented on August 24, 2024

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.

foxtrot avatar foxtrot commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.