Angular support for Knowtify InBox (
1 person uses it
Author: 1149470?v=3 jgentes

Angular support for Knowtify InBox ( Note: For Node users, you should also use for Knowtify Emails support.

How do I use it?

Follow these steps:

1) Install via Bower (

Run bower install angular-knowtify in a terminal

2) Add the Knowtify script to your app HTML page. Be sure to add your public API token here.

var knowtify = _knowtify || []; var _knowtifyInbox = _knowtifyInbox || []; _knowtify.publictoken = "YOUR_PUBLIC_TOKEN_HERE";

3) Add the bower module to your app:

4) Add the service to your Angular app module:

var app = angular.module('myapp', ['knowtify']) { ... }); 5) Inject the Knowtify service into your controller:

function myCtrl($rootScope, $scope, $http, knowtify) { ... }; 6) Add the CSS ID of the Inbox element as YOUR_BUTTON_ID (no # prefix) in your controller, along with the email and unique ID of the user, and push it to Knowtify. This initializes the button that your user will interact with. Review for more information.

knowtify.push(['load_inbox', 'YOUR_BUTTON_ID', {email: "REQUIRED", id: "REQUIRED" }]); 7) Call knowtify.push or knowtify.inbox.push to send notifications using events, behavioral data, scheduled announcements, or manual updates:

knowtify.push(['event', 'testing', { id: 123, email: "" }]) or

knowtify.inbox.push(['message', { id: "123", heading: "Message heading", description: "Message description...", image: "", url: "", created_at: timestamp }]) Note that if you are creating users via Node using 'upsert', then the 'id' must be under "data", not next to 'email' like in the JS API. See

Problems? Submit an issue here:

comments powered by Disqus
This page was last updated over 2 years ago.