角度highchart ng安装

Angular highchart-ng installation

本文关键字:安装 ng highchart 角度      更新时间:2023-09-26

我无法在我的angular应用程序中使用highcharts ng。https://github.com/dmitruk/highcharts-ng

我已经这样安装了:

bower install highcharts-ng

我的index.js看起来像:

    'use strict';
angular.module('highchartApp', [
'ngAnimate',
'ngCookies',
'ngTouch',
'ngSanitize',
'ui.router',
'ui.bootstrap',
'highcharts-ng'
])
      .config(function ($stateProvider, $urlRouterProvider) {
        $stateProvider
          .state('home', {
            url: '/',
            templateUrl: 'app/main/main.html',
            controller: 'MainCtrl'
          });
        $urlRouterProvider.otherwise('/');
      })
    ;

我错过了什么?因为就这样,我犯了这个错误。。。。

Module 'highcharts-ng' is not available! You either misspelled the module name or blablabla

如果解决方案太简单,请原谅我。

您的网页中包含javascript页面了吗?

您必须在bower文件中保存对highcharts ng的引用:

bower install highcharts-ng --save