-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Ionic 2 issue with flatMap property does not exist on type FirebaseListObservable<any[]> #667
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@nicholas-richardson I am not close to ionic, but try adding at the top import 'rxjs/add/operator/flatMap' Also refer to #531 |
@mukesh51 after adding that and trying a few different approaches such as
I receiving the same errors as above with an additon of the follow:
|
@nicholas-richardson your import syntax is not correct. when importing operators, you just need to add the below line as is
The general syntax is import 'rxjs/add/operator/Operator Name'; Hope this helps. |
Sorry I should have included that I tried as you specified with just adding import 'rxjs/add/operator/flatMap' to my component with no success =( |
Apologies:- I just looked at the definition file. you need to import mergeMap. you can find the definitions at the following location ("node_modules\rxjs\add\operator") in your project so please add the following import statement and use flatMap.
and it should work. the below sample snippet worked for me. I am returning a static array, but it shouldn't matter. Let me know how it goes for you.
|
After adding that it seems to fix the flatMap issue but has caused a few other issues related to the import of mergeMap.
|
This might be unrelated to your above error, but looking at your package.json, seems like your angular-version is old. For example angular has moved away from es6-shim to core-js.
|
This is one of the primary reasons we need you to follow the issue template when submitting. A lot of time wasted here discovering that you aren't on the correct versions. If you have additional issues, please resubmit, following the required template. |
Hello everyone,
I am working on my senior college project which is an Ionic 2 app to track water intake using Firebase as the database. I have been able to get the app to build using the follow:
Using the this version of AngularFire2 I am running into some auth issues on build as others have:
Uncaught Error: This operation is not supported in the environment this application is running on. "location.protocol" must be http or https.
To fix this issue I am trying to use the latest version of [email protected] but I run into the following errors on build.
I have tried importing rxjs but that causes more typescript issues than it fixes.
Here is some general information about my environment as well the link to the entire project which is on GitHub.
Ionic Info:
Any help is greatly appreciated to help finish this project on time! Please let me know if any additional information is needed to fix this issue.
Thanks,
Nick
The text was updated successfully, but these errors were encountered: