-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot find source file '../src/ChartEvent.ts' #7
Comments
Just tried to run import {Component} from 'angular2/core';
import { CHART_DIRECTIVES } from 'angular2-highcharts';
/*
* We're loading this component asynchronously
* We are using some magic with es6-promise-loader that will wrap the module with a Promise
* see https://github.com/gdi2290/es6-promise-loader for more info
*/
console.log('`About` component loaded asynchronously');
@Component({
selector: 'about',
directives: [CHART_DIRECTIVES],
styles: [`
h1 {
font-family: Arial, Helvetica, sans-serif
}
`],
template: `
<chart [options]="options"></chart>
<md-card>
<h1>
patrick@AngularClass.com
</h1>
</md-card>
`
})
export class About {
options: Object;
constructor() {
this.options = {
title : { text : 'simple chart' },
series: [{
data: [29.9, 71.5, 106.4, 129.2],
}]
};
}
ngOnInit() {
console.log('hello `About` component');
// static data that is bundled
// var mockData = require('assets/mock-data/mock-data.json');
// console.log('mockData', mockData);
// if you're working with mock data you can also use http.get('assets/mock-data/mock-data.json')
// this.asyncDataWithWebpack();
}
asyncDataWithWebpack() {
// you can also async load mock data with 'es6-promise-loader'
// you would do this if you don't want the mock-data bundled
// remember that 'es6-promise-loader' is a promise
// var asyncMockDataPromiseFactory = require('es6-promise!assets/mock-data/mock-data.json');
// setTimeout(() => {
//
// let asyncDataPromise = asyncMockDataPromiseFactory();
// asyncDataPromise.then(json => {
// console.log('async mockData', json);
// });
//
// });
}
} |
Despite i had a lot of |
@CristyTarantino Could you provide more details ? |
Hi, |
I just started to learn Angular and not an expert yet, but as I understand the problem is that when the plugin is installed via npm install angular2-highcharts --save or using package.json dependencies in the project, the src folder is missing. But there are some links to src folder in *.map files which cause warnings. To solve the problem:
I understand that this is temporary solution and there should be some more officiant way to do it. |
I am using Angular2 and Webpack from https://github.com/AngularClass/angular2-webpack-starter
I followed your readme instructions but I get:
Cannot find source file '../src/ChartEvent.ts': Error: Cannot resolve 'file' or 'directory' ../src/ChartEvent.ts in /Users/username/Dev/angular2-webpack-starter/node_modules/angular2-highcharts/dist
The text was updated successfully, but these errors were encountered: