我构建了ToDoApp并将firebase连接到我的项目,但我有错误。
ERROR in src/app/todo-component/todo-component.component.ts(25,7): error TS2740: Type 'DocumentChangeAction<{}>[]' is missing the following properties from type 'Observable<ToDoInterface[]>': _isScalar, source, operator, lift, and 5 mor
我正在建立一个具有原生脚本角度的社交应用程序,现在我尝试添加“搜索”用户界面,用户将能够搜索其他用户的名称我有用户已经存储在firebase firestore中,我想通过名称搜索他们,但是我收到.subscribe错误,如 error TS2339: Property 'subscribe' does not exist on type 'void' 下面是我的代码: export class HomeComponent implements OnInit {
ageValue: number = 0;
searchValue: string = "
我有一个出租车预订应用程序,使用离子地理定位和Firebase Firestore。我的代码不能与firestore包一起使用,所以我必须将rxjs更新到版本6。
'Property 'filter' does not exist on type 'Observable<Geoposition>'. '
以下是我的代码
import { filter } from 'rxjs/operators';
const subscription = this.geo.watchPosition()
我最近在一个使用Angular和TypeScript的项目中工作。在执行CRUD时,我有下面的代码:
// Return User's List from the DB
get_AllUsers(){
return this.fireservices.collection('users').snapshotChanges();
}
getAllUsersList() : User[]{
let userList : User[];
this.get_AllUsers().subscribe(users => {
我对棱角相当陌生,并且一直在为Firebase的某些方面而奋斗。我正在尝试检索集合中的最新文档,以获取最后一个文档的ID,并使用该ID( and +1)创建新文档。我有一个CRUD服务文件:
import Pedido from './interfaces';
import { AngularFirestoreCollection, AngularFirestoreDocument } from '@angular/fire/compat/firestore';
import { AngularFirestore } from '@angular/fir
我正在从google获取details.ts文件功能中的数据,我已经为此创建了服务,如下所示。它的显示打字错误Property 'then' does not exist on type 'void'
this.typeApi.getTypeDetails(baseUrl).then(data => {
});
在type-api.service.ts文件中,我从google获取数据如下:
import { Injectable } from '@angular/core';
import { Http /*, Response*/ } f
我正在使用Firestore数据库在Angular中创建一个应用程序。我必须使用不同的选择参数进行查询。
如何创建一个字符串,使查询根据用户的选择进行更改?
该应用程序有一个选择表单,其中包含以下字段:
Date from
Date Until
status
Client
Seller
paymenttype
有多种可能的组合,其思想是使用已选择的字段构建一个字符串
例如:
在.ts中
if (typeof this.staTus != "undefined" && typeof this.paymenttype != "undefined" &