justgage eve 未定义

justgage eve is not defined

我正在与 angular 合作,将 angularjs 应用程序重建为 angular 应用程序。现在我需要导入 justgage 来显示分数。一切正常,只是不显示最终得分。

我试图通过遍历我的代码来调试主要问题,但找不到任何东西。我也在 GitHub 上问过我的问题,但还没有回复。

这是我的模块。

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { FlexLayoutModule } from '@angular/flex-layout';

import { MaterialModule } from '@app/material.module';
import { DetailsRoutingModule } from './details-routing.module';
import { DetailsComponent } from './details.component';
import { MeasuresService } from '../measures.service';
import * as PlotlyJS from 'plotly.js/dist/plotly.js';
import { PlotlyModule } from 'angular-plotly.js';
import { JustgageModule } from 'angular2-justgage';
PlotlyModule.plotlyjs = PlotlyJS;

import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { GraphsService } from '@app/measure/details/graph.service';



@NgModule({
  imports: [
    CommonModule,
    PlotlyModule,
    TranslateModule,
    FlexLayoutModule,
    MaterialModule,
    DetailsRoutingModule,
    FormsModule,
    ReactiveFormsModule,
    JustgageModule

  ],
  declarations: [
    DetailsComponent,
  ],
  providers: [
    MeasuresService,
    GraphsService
  ]
})
export class DetailsModule { }

它确实将我在 html 中使用的选项提供给了 justgageModule


<justgage *ngIf="options.title != null" [options]="options" [max]="max" [value]="score"></justgage>

对于结果,它确实显示量具,但不显示动画或加载时的值

this is a problem with justgage

我发现 justgage 中包含的 Raphael 版本无法运行。最新版本的拉斐尔也是如此,你需要 2.2.7 对我有用

希望这对某些人有所帮助