system.js

How to import a service-like singleton-class with System.js?

冷暖自知 提交于 2021-01-28 11:20:14
问题 I have a Singleton-Class FooService that is loaded via an import-map. I'd like to (a)wait for it and use it in various async functions like so: declare global { interface Window { System: System.Module } } const module = window.System.import('@internal/foo-service') const fooService = module.FooService async function func1() { await fooService.doBar() . . } async function func2() { await fooService.doBar2() . . } But I could only get it to work like this: declare global { interface Window {

Issue when migrate Angular 4 with system js and MVC to angular 8

三世轮回 提交于 2019-12-25 18:25:17
问题 I am using Angular 4 with system.js with MVC. My Project structure is same as below link: http://www.developerin.net/a/53-Programming/123-Integrate-Angular-with-ASP.NET-MVC# Now I want to upgrade it to Angular 8. For this I used below links: https://www.talkingdotnet.com/upgrade-angular-4-app-angular-5-visual-studio-2017/ https://update.angular.io/#4.0:8.0 But it not working for me. DO I need to add angular.json OR Do I need to remove system.js? With System.js, Can I upgrade it to Angular 8?

How can I make Aurelia routing work when the application is not at the root of the host

半城伤御伤魂 提交于 2019-12-12 03:23:26
问题 I am building an Aurelia application that will not live at the root of the web site. Its URL will be something like this http://mycompany.com/neatoApp. I have a route configuration that looks like this {route:['','index'], name:'index',moduleId:'index' nave:true, title: 'neato app home'}, {route:['news'], name:'news',moduleId:'news' nave:true, title: 'neato app news'} I have System.js configured so that it knows /neatoApp is the baseURL and it downloads all the scripts and things properly. I