angular-knowtify

Angular support for Knowtify InBox (http://www.knowtify.io/)
Homepage:
1 person uses it
Author: 1149470?v=3 jgentes

Angular support for Knowtify InBox (http://www.knowtify.io/) Note: For Node users, you should also use https://www.npmjs.com/package/knowtify-node for Knowtify Emails support.

How do I use it?

Follow these steps:

1) Install via Bower (http://bower.io/)

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 http://api.knowtify.io/docs/get-started-with-inbox 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: "yourname@gmail.com" }]) or

knowtify.inbox.push(['message', { id: "123", heading: "Message heading", description: "Message description...", image: "https://s3.amazonaws.com/knowtify_web/_img/inbox_profile.png", url: "http://google.com", 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 https://knowtify.readme.io/discuss/56018ae68fcf8d230053c8d8

Problems? Submit an issue here: https://github.com/jgentes/angular-knowtify/issues

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