小编Cli*_*ton的帖子

如何使用Angular Material Datepicker在当时只显示一周?

我们正在努力将Angular Material Datepicker集成到我们的应用程序中.

但是我们希望能够在当时只显示一周.本周特定.用户应该仍然可以通过向下滑动日历来显示该月的其余日期.

以下是用于说明我们的目标的图像.

周月

什么是实现这一目标的好方法?

datepicker angularjs material-design

6
推荐指数
0
解决办法
552
查看次数

我可以在Cloud Functions Http Trigger中使用Firebase身份验证创建用户吗?

是否可以从云功能内部创建用户(电子邮件/密码类型)?我正在寻找这个参考,但一无所获.

firebase firebase-authentication google-cloud-functions

5
推荐指数
2
解决办法
4990
查看次数

Firebase FCM content_available通过Firebase云计算功能引发错误

我一直试图通过云功能发送推送通知.这是有关如何从Firebase执行此操作的指南:https: //github.com/firebase/functions-samples/blob/master/fcm-notifications/functions/index.js

这是我的有效载荷

const payload = {
      "notification": {
        title: 'Title!',
        body: 'Body!',
        sound: 'default'
      },
      "data":{"score":"3x1"},
      "content_available": true,
    };
Run Code Online (Sandbox Code Playgroud)

现在,这会抛出一个错误,当我检查日志时,这是错误:

Error: Messaging payload contains an invalid "content_available" property. Valid properties are "data" and "notification".
    at FirebaseMessagingError.Error (native)
    at FirebaseMessagingError.FirebaseError [as constructor] (/user_code/node_modules/firebase-admin/lib/utils/error.js:25:28)
    at new FirebaseMessagingError (/user_code/node_modules/firebase-admin/lib/utils/error.js:130:23)
    at /user_code/node_modules/firebase-admin/lib/messaging/messaging.js:465:23
    at Array.forEach (native)
    at Messaging.validateMessagingPayload (/user_code/node_modules/firebase-admin/lib/messaging/messaging.js:462:21)
    at /user_code/node_modules/firebase-admin/lib/messaging/messaging.js:204:37
    at process._tickDomainCallback (internal/process/next_tick.js:129:7)
Run Code Online (Sandbox Code Playgroud)

如果我删除content_available:true,它工作正常,所以我知道代码工作.

我还尝试使用CURL/POST请求手动发送此内容,其中包含content_available:true,它也可以.

谢谢!

firebase google-cloud-functions firebase-cloud-messaging

3
推荐指数
1
解决办法
1737
查看次数