systemjs

Build production on SystemJS with systemjs-builder

こ雲淡風輕ζ 提交于 2019-12-25 09:10:56
问题 I have my project that use SystemJS (i use a template that comes on this way). I need to build the final project to production env. I read that i can use systemjs-builder for this. I read the official page: https://github.com/systemjs/builder. Sorry, i'm so new on Angular 2! I don't understand how to start. For example, this part: Basic Use Ensure that the transpiler is installed separately (npm install babel-core here). var path = require("path"); var Builder = require('systemjs-builder'); /

Build production on SystemJS with systemjs-builder

回眸只為那壹抹淺笑 提交于 2019-12-25 09:07:09
问题 I have my project that use SystemJS (i use a template that comes on this way). I need to build the final project to production env. I read that i can use systemjs-builder for this. I read the official page: https://github.com/systemjs/builder. Sorry, i'm so new on Angular 2! I don't understand how to start. For example, this part: Basic Use Ensure that the transpiler is installed separately (npm install babel-core here). var path = require("path"); var Builder = require('systemjs-builder'); /

typescript compiler bundle doesn't contain dependencies

青春壹個敷衍的年華 提交于 2019-12-25 09:01:24
问题 I try to bundle my angular2 application with the typescript compiler with a tsconfig.js like this: { "compilerOptions": { "target": "es5", "module": "system", "moduleResolution": "node", "sourceMap": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "lib": [ "es2015", "dom" ], "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, "outFile": "bundle.js" } } It creates a bundle.js but without any angular-depenencies. It only includes my own components and typescript

Angular 2 & ng2-charts: (SystemJS) Unexpected directive 'BaseChartComponent' imported

依然范特西╮ 提交于 2019-12-25 04:57:04
问题 I am trying to get the ng2-charts module to work with my Angular 2 application using a Node.js back-end. This is my app.module.ts file import {NgModule} from "@angular/core"; import {BrowserModule} from "@angular/platform-browser"; import {FormsModule} from "@angular/forms"; import {HttpModule} from "@angular/http"; import AppComponent from "./app.component"; import TwitterService from "./twitter.service"; import BarGraphComponent from "./bar-graph.component"; import LineGraphComponent from "

VS2015 + Cordova + SystemJS + Security Restriction Error: 0x800c001c

不羁的心 提交于 2019-12-24 12:36:24
问题 I'm getting an Unhandled exception 0x800c001c when I debug my Cordova project for Windows Phone 8.1 and Windows Phone 10. The problem is the document.write used in System.js . I understand winstore-jscompat.js link is used to resolve this problem, and the <script src="... element is in the index HTML. However, it doesn't seem to solve the dynamic content problem with Windows Phone. When I look at the dom I can see winstore-jscompat.js is dynamically added by platformOverrides.js and is

node_modules in AngularJS 2 [ng cli] without System.config

微笑、不失礼 提交于 2019-12-24 09:57:20
问题 How do I include node_modules without System.config with AngularJS 2 projects generated with ng ? Attempts (in src/index.html ): <link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="node_modules/bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="bootstrap/dist/css/bootstrap.min.css"> <link rel="stylesheet" href="dist/css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet"

System.config is not defined

杀马特。学长 韩版系。学妹 提交于 2019-12-24 08:18:04
问题 Hi I don't know why I have this error when I want configure my angular project : System.config is not a funtion My package.json & html : { "name": "", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "@angular/common": "^5.2.0", "@angular/compiler": "^5.2.0", "@angular/core": "^5.2.0", "@angular/platform-browser": "^5.2.0", "@angular/platform-browser-dynamic": "^5

Angular2, manually resolve a type by string/name

廉价感情. 提交于 2019-12-24 02:12:46
问题 Is it possible to manually resolve a component by only knowing it's name? I have a string variable which will contain the name of a component, lets say "UserService" I need to be able to resolve this type, I've looked at Injctor , I can see from the documenation there is a resolve() and resolveAndCreate() (https://angular.io/docs/ts/latest/api/core/Injector-class.html) but I don't have the Type. Thanks Steve EDIT : tried the following: System.import("path/to/service").then(p=>{ var injector =

How configure SystemJS with Auth0?

蹲街弑〆低调 提交于 2019-12-24 00:59:44
问题 I tried configure SystemJS for Auth0 (angular2-jwt) and Angular 2.0.0-beta.6 but always I get the following error: GET http://localhost:3000/angular2/http 404 (Not Found)fetchTextFromURL @ system.src.js:1068(anonymous function) @ system.src.js:1649lib$es6$promise$$internal$$initializePromise @ angular2-polyfills.js:515lib$es6$promise$promise$$Promise @ angular2-polyfills.js:806(anonymous function) @ system.src.js:1648(anonymous function) @ system.src.js:2669(anonymous function) @ system.src

Wait for a module to be loaded to execute the tests it contains

梦想的初衷 提交于 2019-12-24 00:43:13
问题 My unit tests are contained into a module that loads from an HTML page using SystemJS. <script src="node_modules/systemjs/dist/system.src.js"></script> <script src="node_modules/rxjs/bundles/Rx.js"></script> <script src="node_modules/jasmine-core/lib/jasmine-core/jasmine.js"></script> <script src="node_modules/jasmine-core/lib/jasmine-core/jasmine-html.js"></script> <script src="node_modules/jasmine-core/lib/jasmine-core/boot.js"></script> <script> System.config({ defaultJSExtensions: true,