Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Angular集成push.js #106

Open
deepthan opened this issue Sep 10, 2020 · 0 comments
Open

Angular集成push.js #106

deepthan opened this issue Sep 10, 2020 · 0 comments

Comments

@deepthan
Copy link
Owner

Angular集成push.js

1. 什么是push.js

push.js

1. 集成和基本使用方法

  • 下载
npm install push.js --save

or

yarn add push.js --save
  • 使用
import Push from 'push.js'; 

// some other codes
ngOnInit(){
     Push.create('Hello world!')
}

2. 可传参数和配置项

image

  • 通知配置项
选项 说明
body 通知的内容文本
icon 右侧x下面的标题
requireInteraction 是否一直存在,直到被点击或者关闭
timeout 多久自动消失

查看弹窗权限

3. 谷歌通知被禁止怎么恢复

开启或关闭弹出式窗口

  • 计算机上打开 Chrome
  • 在右上角,依次点击更多图标然后设置
  • 在底部,点击高级
  • 隐私设置和安全性下方,点击网站设置
  • 点击通知
  • 禁止部分删除你的网站即可
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant