我rrule通过运行安装了插件:
npm install @fullcalendar/rrule
Run Code Online (Sandbox Code Playgroud)
但是当我将其导入添加到我的组件时:
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
import rrulePlugin from '@fullcalendar/rrule'; //error appears after adding this import
Run Code Online (Sandbox Code Playgroud)
我收到此错误:
node_modules/@fullcalendar/common/vdom.d.ts:16:28 - error TS2304: Cannot find name 'FullCalendarVDom'.
16 export import flushToDom = FullCalendarVDom.flushToDom;
~~~~~~~~~~~~~~~~
node_modules/@fullcalendar/common/vdom.d.ts:16:28 - error TS2503: Cannot find namespace 'FullCalendarVDom'.
16 export import flushToDom = FullCalendarVDom.flushToDom;
Run Code Online (Sandbox Code Playgroud)
其他插件导入工作正常。哪里有问题?
我不能使用putText函数.我得到编译错误"putText不是CV的成员"或"putText未在此范围内声明".这些是我包括的图书馆:
#include <iostream>
#include "core.hpp"
#include "highgui.hpp"
#include "imgcodecs.hpp"
#include "cv.h"
Run Code Online (Sandbox Code Playgroud)
这就是我所说的:
cv::putText(frame,"REC",Point(0,60),2,2,Scalar(0,0,255));
Run Code Online (Sandbox Code Playgroud)
我究竟做错了什么?
我需要使用内部获取的属性.subscribe来更新HTML。我知道这.subscribe是异步的,因此在解析值之前是不确定的,但是如何让它等到具有该值呢?目前,我仅获得undefined对象属性。
这是我的服务方法,在这里我调用API来获取数据:
fetchCustomers(name: string) Observable<Customer[]> {
return this.http.get<Customer>('MY URL')
}
Run Code Online (Sandbox Code Playgroud)
以及我订阅的组件:
customer: any;
name: string;
ngOnInit() {
//this.name = /*code to retrieve the name*/
this.renderCustomer(this.name)
}
renderCustomer(name) {
this.testService.fetchCustomer(name).subscribe(data => {
this.customer = data
})
}
Run Code Online (Sandbox Code Playgroud)
但是当我调用该方法时this.customer仍未定义。我需要的属性data来呈现这样的HTML文件:
fetchCustomers(name: string) Observable<Customer[]> {
return this.http.get<Customer>('MY URL')
}
Run Code Online (Sandbox Code Playgroud)
我如何使这条线this.customer = data等到Observable解决?我也尝试过this.customer = JSON.parse(JSON.stringify(data))在另一个线程中建议它,但是它没有用。
我为 firebase 云函数添加了函数文件夹。但是现在我无法部署我的Angular项目。当我仅部署带有firebase deploy --only functions它的功能时,它工作正常,但是当我尝试通过运行部署我的项目时firebase deploy,出现此错误:
Error: desktop/projects/my-angular-project/firestore.indexes.json does not exist
Run Code Online (Sandbox Code Playgroud)
我的firebase.json文件:
{
"hosting": {
"public": "public",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**",
"**/functions/**"
],
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"firestore": {
"rules": "firestore.rules",
"indexes": "firestore.indexes.json"
},
"functions": {
"predeploy": [
"npm --prefix \"$RESOURCE_DIR\" run lint",
"npm --prefix \"$RESOURCE_DIR\" run build"
]
}
}
Run Code Online (Sandbox Code Playgroud)
我该如何解决?