__WEBPACK_IMPORTED_MODULE_ xxxxx is not a function
See original GitHub issue(Was originally opened here: https://github.com/angular/angular/issues/15866)
I’m submitting a … (check one with “x”)
[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior Webpack (or Typescript) seems to strip static methods on inheritance. I’m posting here because the problem manifests in the context of Angular.
We’re using angularfire2
, and more specifically FirebaseListObservable
.
FirebaseListObservable extends Observable
, so FirebaseListObservable
should have the static function of
.
However, when I do ng serve
I get the following error:
__WEBPACK_IMPORTED_MODULE_1_angularfire2__.a.of is not a function
at AppComponent.webpackJsonp.132.AppComponent.ngOnInit
Expected behavior
Looking through angularfire2
’s code for FirebaseListObservable, they extend Observable like expected, and thus of
should be available. So I’m not thinking it’s their problem?
Minimal reproduction of the problem with instructions
ng new bug
npm install angularfire2 --save
npm install firebase --save
npm install rxjs --save
app.component.ts:
import { Component, OnInit } from '@angular/core';
import { FirebaseListObservable } from 'angularfire2';
import { Observable } from 'rxjs';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
title = 'app works!';
ngOnInit() {
FirebaseListObservable.of({}).subscribe();
}
}
ng serve --open
Please tell us about your environment:
-
Angular version: 4.0.1
-
Browser: [all]
-
Language: TypeScript 2.2.2
-
Node (for AoT issues):
node --version
= 7.8.0
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (5 by maintainers)
You need to import any operators that will be used. For
of
:This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.