我試圖弄明白如何使用聚合物<platinum-push-messaging>
元素,但沒有運氣。在該元素的文檔,它說,你需要註冊你的「gcm_sender_id」,然後定義元素本身,就像這樣:聚合物鉑推送消息元素
<platinum-push-messaging
title="Application updated"
message="The application was updated in the background"
icon-url="icon.png"
click-url="notification.html">
</platinum-push-messaging>
爲了測試它有一個叫testPush(message)
方法,但它總是返回我以下錯誤:
platinum-push-messaging.html:437 Uncaught (in promise) TypeError: Cannot read property 'active' of undefined(…)
我不知道如果我忘了什麼東西,和Cat Push Notifications project不會在所有幫助,我無法得到它的工作...
任何人都可以點我向正確的方向?
太棒了!這比它在Polymer網站上的文檔更好,非常感謝... – RoO