bootsoon / ng-circle-progress

A simple circle progress component created for Angular based on SVG Graphics.
https://bootsoon.github.io/ng-circle-progress/
MIT License
250 stars 85 forks source link

Building doesn't work #113

Closed csimpi closed 3 years ago

csimpi commented 4 years ago

Hi, I can't build my own version I'm getting serveral errors. After npm install, and npm build I'm getting typescript version issues, so I've changed the package.json typescript version.

After this building was successful, but the result doesn't work. I've tried install the custom built package from the root dir, also from the dist, doesn't work.

ChecklistsComponent.html:4 ERROR NullInjectorError: StaticInjectorError(AppModule)[CircleProgressComponent -> ElementRef]: 
  StaticInjectorError(Platform: core)[CircleProgressComponent -> ElementRef]: 
    NullInjectorError: No provider for ElementRef!

packages.json - dependencies

    "ng-circle-progress-mtp": "file:custom_builds/ng-circle-progress-mtp/dist",

app.module.ts

import { NgCircleProgressModule } from 'ng-circle-progress-mtp';
    NgCircleProgressModule.forRoot({
      "backgroundOpacity": 1,
      "backgroundStrokeWidth": 0,
      "backgroundPadding": 25,
      "radius": 45,
      "space": -6,
      "toFixed": 0,
      "maxPercent": 100,
      "outerStrokeGradient": true,
      "outerStrokeWidth": 6,
      "outerStrokeColor": "#4882c2",
      "outerStrokeGradientStopColor": "#53a9ff",
      "innerStrokeColor": "#e7e8ea",
      "innerStrokeWidth": 6,
      "titleFontSize": "28",
      "titleFontWeight": "50",
      "subtitleFontSize": "19",
      "imageHeight": 124,
      "animateTitle": true,
      "animationDuration": 1000,
      "showUnits": false,
      "showBackground": false,
      "renderOnClick":false,
      "lazy": false
    }),
bootsoon commented 3 years ago

1.6.0 released.