我试图在我的角应用程序中集成谷歌云存储,它导致了这个错误
当我启动我的服务到构造函数
这是我正在使用的服务:
import { Injectable } from '@angular/core';
import { AngularFirestore, AngularFirestoreCollection,
AngularFirestoreDocument } from 'angularfire2/firestore';
import { Idata } from '../model';
import { Observable } from 'rxjs/Observable';
@Injectable()
export class DataService {
// collections initialisation
datas: Observable<Idata[]>;
dataCollection: AngularFirestoreCollection<Idata>;
dataDocumment: AngularFirestoreDocument<Idata>;
data: Observable<Idata>;
constructor(public afs: AngularFirestore) {
}
// get all documents for caucus
getDataCaucus() {
this.dataCollection = this.afs.collection('eluCC');
this.datas = this.afs.collection('eluCC').snapshotChanges().map(changes => {
return changes.map(a => {
const data = a.payload.doc.data() as Idata;
data.id = a.payload.doc.id; …
Run Code Online (Sandbox Code Playgroud) 有没有人知道如何解决此错误消息
错误CS1729:'SQLiteConnection'不包含带有1个参数的构造函数(CS1729)
这是它发生的文件
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using SQLite;
using Android.Util;
using SQLite.Net;
namespace CPDEP1
{
public class DataBase
{
string folder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.Personal);
public bool createDataBase()
{
try
{
using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "Persons.db")));
{
connection.CreateTable<Person>();
return true;
}
}
catch(SQLiteException ex)
{
Log.Info("SQLiteEx", ex.Message);
return false;
}
}
public bool insertIntoTablePerson(Person person)
{
try
{
using (var connection = new …
Run Code Online (Sandbox Code Playgroud) 每当我尝试过滤表格的一列时,我都会遇到此错误.我从FireStore云集合中获取数据,并且每个文档中的字段auteur都已明确定义.
这是我的组件的样子
import { Component, OnInit, ViewChild} from '@angular/core';
import { Router } from '@angular/router';
import { DataService } from '../../services/data.service';
import { Observable } from 'rxjs/Observable';
import { AngularFirestore } from 'angularfire2/firestore';
import { AuthentificationService } from '../../services/authentification.service';
@Component({
selector: 'app-data-preview',
templateUrl: './data-preview.component.html',
styleUrls: ['./data-preview.component.css']
})
export class DataPreviewComponent implements OnInit {
rows = [];
temp = [];
selected: any[] = [];
columns;
panelOpenState = false;
id: any;
@ViewChild(DataPreviewComponent) table: DataPreviewComponent;
constructor(private router: Router, private dataService: DataService,
private afs: …
Run Code Online (Sandbox Code Playgroud) 我已经设置了一个带有 firebase 电子邮件和密码登录的身份验证防护,问题是它会自动触发到指定组件的路由。
我已经实现了身份验证保护并将其设置在正确的模块提供程序中(因为我的应用程序中有很多提供程序)。这是我的身份验证服务:
import { Injectable } from '@angular/core';
import { Router, Route ,CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanActivateChild, CanLoad } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { SimpleAuthService } from './simple-auth.service';
@Injectable()
export class AuthGuard implements CanActivate, CanActivateChild, CanLoad {
constructor(private authService: SimpleAuthService) { }
canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
const url: string = state.url;
return this.checkLogin(url);
}
canActivateChild(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable<boolean> {
return this.canActivate(route, state);
}
canLoad(route: Route): Observable<boolean> {
const url: string = …
Run Code Online (Sandbox Code Playgroud)