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

Problems with ionic 2.3.0 #120

Open frankmyhre opened 7 years ago

frankmyhre commented 7 years ago

Hey guys,

I tried using this module in an ionic 3.0.1 project and everything worked as a charm. Then I wanted to move the pieces of code to another project which is significant larger, and runs ionic 2.3.0.

When I import the module in app.module.ts, this error comes up:

` [19:23:18] typescript: ...ressbar/node_modules/@angular/core/src/animation/animation_metadata_wrapped.d.ts, line: 12 [19:23:18] typescript: .../angular-svg-round-progressbar/node_modules/@angular/core/src/animation/dsl.d.ts, line: 34 [19:23:18] typescript: ...modules/angular-svg-round-progressbar/node_modules/@angular/core/src/errors.d.ts, line: 9 [19:23:18] typescript: ...modules/angular-svg-round-progressbar/node_modules/@angular/core/src/errors.d.ts, line: 10 [19:23:18] typescript: ...modules/angular-svg-round-progressbar/node_modules/@angular/core/src/errors.d.ts, line: 11 Initializers are not allowed in ambient contexts.

[19:23:18] typescript: ...modules/angular-svg-round-progressbar/node_modules/@angular/core/src/errors.d.ts, line: 12 [19:23:18] typescript: ...modules/angular-svg-round-progressbar/node_modules/@angular/core/src/errors.d.ts, line: 13 [19:23:18] transpile failed L13: * @deprecated This symbol has moved. Please Import from @angular/animations instead!

        Initializers are not allowed in ambient contexts. 

  L35:   * @experimental Animation support is experimental.

        Initializers are not allowed in ambient contexts. 

   L8:  export declare function getDebugContext(error: Error): DebugContext;
   L9:  export declare function getOriginalError(error: Error): Error;
  L10:  export declare function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void;

        Initializers are not allowed in ambient contexts. 

   L9:  export declare function getOriginalError(error: Error): Error;
  L10:  export declare function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void;

        Initializers are not allowed in ambient contexts. 

  L10:  export declare function getErrorLogger(error: Error): (console: Console, ...values: any[]) => void;

        Initializers are not allowed in ambient contexts. 

        Initializers are not allowed in ambient contexts.

`

One suggested that I created a new project and copied my already existing project to it, but this sounds like something I would really avoid.

So my question is, why is the module suddenly not working on ionic 2.3.0 but on ionic 3.0.1

crisbeto commented 7 years ago

My guess is that your other project is using Angular 2. I bumped the minimum required version to 4 in the 1.1.0 release, because the Angular compiler output wasn't backwards-compatible with 2, This meant that I could no longer publish the proper metadata for both 4 and 2. If you're able to, you should update to Angular 4, otherwise you can install the 1.0.7 release of the progress circle.

kacperslo commented 7 years ago

@crisbeto you have to import it by src/app/app.module.ts

urbanmania commented 7 years ago

dropping down to 1.0.7 worked for me, thanks :) 👍