Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度4+;Firebase数据库+;文件存储_Angular_Firebase_Firebase Realtime Database_Angularfire_Firebase Storage - Fatal编程技术网

Angular 角度4+;Firebase数据库+;文件存储

Angular 角度4+;Firebase数据库+;文件存储,angular,firebase,firebase-realtime-database,angularfire,firebase-storage,Angular,Firebase,Firebase Realtime Database,Angularfire,Firebase Storage,最近我一直在开发一个应用程序,在尝试组装所有东西时,我发现了一些困难。 我的想法是有一个地方,我可以提交数据+图像,这是我想出的 这是component.ts,我在这里有firebase post数据配置,以防您想看到它 从'@angular/core'导入{Component,OnInit}; 从“angularfire2/database”导入{AngularFireDatabase,FirebaseListObservable}; 从“../router.animations”导入{m

最近我一直在开发一个应用程序,在尝试组装所有东西时,我发现了一些困难。 我的想法是有一个地方,我可以提交数据+图像,这是我想出的

这是component.ts,我在这里有firebase post数据配置,以防您想看到它

从'@angular/core'导入{Component,OnInit};
从“angularfire2/database”导入{AngularFireDatabase,FirebaseListObservable};
从“../router.animations”导入{moveIn,moveInLeft,fallIn};
接口utilfaq{
错误:字符串;
独奏:弦乐;
程序A:字符串;
特马:弦;
子主题:字符串;
$key?:字符串;
}
@组成部分({
选择器:“app-submissoesv2”,
templateUrl:“./submissesv2.component.html”,
样式URL:['./submissesv2.component.css'],
动画:[moveIn()],
主机:{'[@moveIn]':''}
})
导出类Submissov2Component{
只读errosPath=“erros”;
formutilfaq:utilfaq={
“错误”:“,
“索鲁考”:“,
“程序A”:“,
"特马":",",,
'子主题':',',
};
UtilFaqssStream:FirebaseListObservable;
构造函数(db:AngularFireDatabase){
this.utilfaqsStream=db.list(this.errosPath);
}
onSubmit():void{
this.utilfaqsStream.push(this.formutilfaq);
this.formutilfaq={
“错误”:“,
“索鲁考”:“,
“程序A”:“,
“特马”:“,
'子主题':',',
};
试一试{
if(此.formutilfaq.$key){
this.utilfaqsStream.update(this.formutilfaq.$key,this.formutilfaq);
}否则{
this.utilfaqsStream.push(this.utilfaqsStream);
}
this.formutilfaq={
“错误”:“,
“索鲁考”:“,
“程序A”:“,
“特马”:“,
'子主题':',',
};
}捕获(e){
log('formerror:',e);
}
}
编辑(utilfaq:utilfaq):无效{
this.formutilfaq=utilfaq;
}
移除(utilfaqKey:string):无效{
this.utilfaqsStream.remove(utilfaqKey);
}
}