crisbeto / angular-svg-round-progressbar

Angular module that uses SVG to create a circular progressbar
https://crisbeto.github.io/angular-svg-round-progressbar/
MIT License
742 stars 173 forks source link

ProgressBar and angular Universal #106

Closed sinzen closed 7 years ago

sinzen commented 7 years ago

Hi Crisbeto,

In the implementation of a progressBar version 1.0.3.

I try to include the import in a module like this: import { RoundProgressModule } from 'angular-svg-round-progressbar/dist/round-progress';

and I declare in the imports module: @NgModule({ bootstrap: [ AppComponent ], imports: [ ... RoundProgressModule, ... ], I use webpack to complie and I have an Error bellow:

var BASE = document.head.querySelector('base'); ReferenceError: document is not defined [nodemon] app crashed - waiting for file changes before starting... Can You help me?

crisbeto commented 7 years ago

Yeah, this module expects there to be a DOM. I should be able to switch it over to at least not throw an error.

sinzen commented 7 years ago

How can I fix that?

crisbeto commented 7 years ago

You can't, I'll have to fix it on my end and release a fix.

crisbeto commented 7 years ago

I've released version 1.0.4 that should fix the errors with Angular Universal.