Comments (7)
Thank you for your example. I agree it is best to map sources. To solve my problem I changed my map statement to include '.js' in the key. I thought that setting defaultExtension: 'js' in the packages object in System.config would make it unnecessary to have '.js' in the alias. Clearly, I don't understand systemjs well enough. The following config is what I'm now using in index.html:
System.config({
packages: {
app: {
format: 'register',
defaultExtension: 'js'
},
'angular2-highcharts': {
format: 'cjs',
defaultExtension: 'js'
}
},
map: {
'angular2-highcharts': 'node_modules/angular2-highcharts',
'highcharts/highstock.src.js': 'node_modules/highcharts/highstock.js'
},
});
from angular2-highcharts.
Which bundler do you use ?
from angular2-highcharts.
systemjs : 0.19.24
node : 5.5.0
npm : 3.8.2
from angular2-highcharts.
I think it is better to map sources. Look at the example of loading via systemjs http://plnkr.co/edit/pnkc8Iw9cSrCYn9zr0VZ?p=preview. I am not a specialist in systemjs so would be great if you suggest how to manage this better.
from angular2-highcharts.
Ok, I just looked again at 'node_modules/angular2-highcharts/dist/Highcharts.js' and I see that the '.js' extension is included in the reference (var Highcharts = require('highcharts/highstock.src.js');)
So my real problem was that the name of my alias in the map statement was not exactly the same as the name in the reference. I should have caught this. It looks like the current version of dist/Highcharts.js does not include the extension. I am using v. 0.0.5. In any case the problem is solved and I thank you very much for your help.
from angular2-highcharts.
Good.
from angular2-highcharts.
GET http://localhost:4200/node_modules/angular2-highcharts 404 (Not Found)scheduleTask @ zone.js:101ZoneDelegate.scheduleTask @ zone.js:336Zone.scheduleMacroTask @ zone.js:273(anonymous function) @ zone.js:122send @ VM729:3fetchTextFromURL @ system.src.js:1154(anonymous function) @ system.src.js:1735ZoneAwarePromise @ zone.js:584(anonymous function) @ system.src.js:1734(anonymous function) @ system.src.js:2759(anonymous function) @ system.src.js:3333(anonymous function) @ system.src.js:3600(anonymous function) @ system.src.js:3985(anonymous function) @ system.src.js:4448(anonymous function) @ system.src.js:4700(anonymous function) @ system.src.js:406ZoneDelegate.invoke @ zone.js:323Zone.run @ zone.js:216(anonymous function) @ zone.js:571ZoneDelegate.invokeTask @ zone.js:356Zone.runTask @ zone.js:256drainMicroTaskQueue @ zone.js:474ZoneTask.invoke @ zone.js:426
zone.js:461 Unhandled Promise rejection: Error: XHR error (404 Not Found) loading http://localhost:4200/node_modules/angular2-highcharts
at XMLHttpRequest.wrapFn as _onreadystatechange
at ZoneDelegate.invokeTask (http://localhost:4200/vendor/zone.js/dist/zone.js:356:38)
at Zone.runTask (http://localhost:4200/vendor/zone.js/dist/zone.js:256:48)
at XMLHttpRequest.ZoneTask.invoke (http://localhost:4200/vendor/zone.js/dist/zone.js:423:34)
Error loading http://localhost:4200/node_modules/angular2-highcharts as "angular2-highcharts" from http://localhost:4200/app/app.component.js ; Zone: ; Task: Promise.then ; Value: Error: Error: XHR error (404 Not Found) loading http://localhost:4200/node_modules/angular2-highcharts(…)consoleError @ zone.js:461_loop_1 @ zone.js:490drainMicroTaskQueue @ zone.js:494ZoneTask.invoke @ zone.js:426
zone.js:463 Error: Uncaught (in promise): Error: Error: XHR error (404 Not Found) loading http://localhost:4200/node_modules/angular2-highcharts(…)
i am using angular cli
from angular2-highcharts.
Related Issues (20)
- How to draw a candlestick chart? HOT 2
- How to show multiple chart in same graph? do you have any example?
- ERROR in Error during template compile of 'AppModule' Function calls are not supported in decorators but 'ChartModule' was called. HOT 5
- ar
- How to import "indicators" inside AppModule
- multi language support HOT 1
- use gauge chart in pure typeScript projects HOT 3
- Support for bullet type chart missing HOT 5
- Chart not responsive - width stuck at 600px no matter what I do HOT 7
- sunburst module missing ? HOT 2
- How to make Gauge chart dynamic as speedometer in angular 4 HOT 1
- Can't use responsive attribute in options
- The live demos do not work
- type=line did not show data in graph
- Use classic mode instead of Styled mode
- serie type of columnrange HOT 2
- Event properties target.category and clickevent.point are not available in angular 6 typescript
- How to use this plugin for commerical use HOT 1
- Angular 8 support?
- How to implement Gantt in angular2-highcharts? is it supported or not?
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 angular2-highcharts.