systemjs

Angular2 SystemJs Bundles and Non Bundled js

雨燕双飞 提交于 2019-12-11 21:15:46
问题 I'm new to SystemJs and Angular2. I am using 3rd party packages, some of which have bundles/code.js files and some do not. The ones that are using bundles/code.js I have managed to get working. I include <script src=foo/bundles/code.js> and am then able to import * from 'code/foo' inside my ts files. This all makes sense to me as the bundles/code.js has something like System.registerDynamic("code/foo",...) and so the import knows what code/foo is (This is my understanding of it) I have come

@NgModule loading dynamic components on runtime using SystemJs

懵懂的女人 提交于 2019-12-11 18:41:57
问题 I am trying to load dynamic components on run time using the compileModuleAndAllComponentsAsync function. while loading the components i am trying to inject a service called ServicetestService . Now what is happening is that when the code reaches : Heading ##const cmp = factory.create(inj, [], null, moduleRef); I am getting this error: "Error: StaticInjectorError(ServicetestService)[AnimationBuilder -> RendererFactory2]: \n NullInjectorError: No provider for RendererFactory2!\n at

Importing operators with RXJS 5.0.0-beta.6 and Angular 2 RC1

六眼飞鱼酱① 提交于 2019-12-11 13:09:37
问题 I am building an Angular 2 web app using Typescript and am trying to switch from Angular2-beta-17 to Angular2-RC1. I am struggling to get the imports of the RXJS operators to work. I am using SystemJS as a module loader, and suspect this is were the problem lies. I copy the file bundles I need from my node modules to a lib-folder and then include the files in the index.html file like this (the commented sections are some of the many combinations of different attempts for solutions I have

Multiple anonymous defines in module Typescript with Riot-ts (Riotjs)

冷暖自知 提交于 2019-12-11 13:00:44
问题 Have to say that setting up the environment for Typescript is laborious and fraught with frustration. It's not a straight forward task by any means. Anyway: I am still trying to setup riot-ts with JSPM. I have gotten further along, but it's not working correctly. I now have the following: tsd.json: { "version": "v4", "repo": "borisyankov/DefinitelyTyped", "ref": "master", "path": "typings", "bundle": "typings/tsd.d.ts", "installed": { "jquery/jquery.d.ts": { "commit":

How to call a named module from a bundle

℡╲_俬逩灬. 提交于 2019-12-11 12:26:05
问题 I have a project with ASP.NET 5 and TypeScript. basically this is my wwwroot folder -wwwroot |-app ||-person.js ||-employee.js ||-init.js |-js ||-libraries.js // Contains: systemjs, ...etc ||-app.bundle.js person.js is an es6 module which exports class Person . employee.js imports person.js and exports class Employee . init.js just imports employee.js , creates a new Employee object and console his name. //init.js import { Employee } from "./employee"; var p = new Employee(); console.log(p

How to ES6 import (SystemJS) after some code?

…衆ロ難τιáo~ 提交于 2019-12-11 11:52:53
问题 I want to import angular, instantiate the AngularJS module, and then import another file that requires that the Angular be already instantiated: import angular from 'angular'; var app = angular.module('app', []); import 'src/app.js'; angular.element(window).ready(function(){ angular.bootstrap(document, ['app']); }); But Babel compiles it into this ( TLDR : hoist all imports to the top) System.register([], function (_export2) { return { setters: [], execute: function () { System.register([

System config defaultExtension not working for Django

血红的双手。 提交于 2019-12-11 10:43:37
问题 I am trying to port angular 2 tutorial with Django backend Here is my html file <html> <head> <title>Angular 2 QuickStart</title> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="styles.css"> <!-- 1. Load libraries --> <!-- IE required polyfills, in this exact order --> <script src="/static/main.js"></script> <script src="/static/node_modules/es6-shim/es6-shim.min.js"></script> <script src="/static/node_modules/systemjs/dist/system-polyfills.js

Generating both browserify output & System.register() modules from ES6 modules?

∥☆過路亽.° 提交于 2019-12-11 09:07:55
问题 I have coded ES6 modules as per 2ality's final syntax example, without a .js suffix. I have as well organised the modules into a vendor/project directory hierarchy and module naming scheme as System.register() module format effectively places registered modules into the same namespace. The problem is as follows, if I quote 2ality's example: //------ lib.js ------ export const sqrt = Math.sqrt; export function square(x) { return x * x; } export function diag(x, y) { return sqrt(square(x) +

How do I correctly include “require” in my angular 2 project?

徘徊边缘 提交于 2019-12-11 06:19:03
问题 I am still attempting to get the angular 2 code mirror module working within my angular 2 app. I've had some import issues that I've detailed here, that I seem to have gotten past, but now I've run into a new issue. My most recent stack trace is this Error: (SystemJS) require is not a function @http://localhost:8050/node_modules/ng2-codemirror/lib/codemirror.module.js:8:14 ZoneDelegate.prototype.invoke@http://localhost:8050/node_modules/zone.js/dist/zone.js:232:17 Zone.prototype.run@http:/

systemjs.config.js in angular2

守給你的承諾、 提交于 2019-12-11 05:21:40
问题 I am new to angular2 and I want to know the use of all the objects present inside systemjs.config.js file. System.config({ paths: { // paths serve as alias 'npm:': 'node_modules/' }, // map tells the System loader where to look for things map: { // our app is within the app folder app: 'dist', main: 'main.js', // angular bundles '@angular/core': 'npm:@angular/core/bundles/core.umd.js', '@angular/common': 'npm:@angular/common/bundles/common.umd.js', '@angular/compiler': 'npm:@angular/compiler