-
Notifications
You must be signed in to change notification settings - Fork 304
ngc Error: Property 'string' does not exist on type... #122
Comments
Had same problem, feel this is related that on ionic.modules when the provider is declared, there is no string. My solution was to make the class abstract, remove it from [providers] app.modules.ts and just make that every other class using it is extending it.
|
Hello, sorry for the delay on this one! This is actually an NGC error and not an Ionic error. NGC is the AoT compiler that the Angular team is building. It has the ability to do typechecking of variables and methods that are bound to your templates, it is also very strict in its typechecking. Since NGC is an Angular project i am going to close this issue and ask that you open an issue on the Angular repo. Thanks! |
If anyone is getting this error, [this issue] (angular/angular#12551) could be of same help. |
Short description of the problem:
My app works fine when using
ionic serve
. However, when I run abuild
(e.g.ionic run android
), ngc will throw an error:The constructor code in question is below:
Some people on the forum have worked around this by removing all mention of
string
in the constructor, but because I am extending from theAngularFire
class, I must state the super call as is.What behavior are you expecting?
ngc should not throw an error(?)
Steps to reproduce:
string
variable in the constructor.app.module.ts
$ npm run build
or$ ionic run android
or$ ionic run ios
Which @ionic/app-scripts version are you using?
0.0.30
The text was updated successfully, but these errors were encountered: