Skip to content

angular cli build with AOT mode fail with @Inject(FirebaseApp) firebaseApp: firebase.app.App does not work with angular cli AOT mode #799

@morninng

Description

@morninng

I am using firebase storage in my web app and I am using following code to refer the firebase function which is not implemented in angularfire2.

@Injectable()
export class LoggerService {
constructor( @Inject(FirebaseApp) firebaseApp: firebase.app.App) {

However because of this code, "ng build --aot" fail with error.
"ng build" succeed without any issue but I cannot use aot mode.

Version info

Angular:
"@angular/common": "^2.3.1",
"@angular/compiler": "^2.3.1",
"@angular/core": "^2.3.1",
Firebase:
"firebase": "^3.6.7",
AngularFire:
"angularfire2": "^2.0.0-beta.7",

Other
ubuntu 16.04
node v6.9.2

command to reproduce issue
ng build --aot

source code
@Injectable()
export class LoggerService {
constructor( @Inject(FirebaseApp) firebaseApp: firebase.app.App) {

Errors in terminal

ERROR in Error encountered resolving symbol values statically. Expression form not supported (position 87:49 in the original .ts file), resolving symbol LoggerService in /home/morninng/development/Angular2/mixidea_cowork/src/app/core/service/logger.service.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions