Skip to content

Instantly share code, notes, and snippets.

@lperrin
Created July 9, 2014 17:26
Show Gist options
  • Save lperrin/a93e3d8d15bbb1f56fa5 to your computer and use it in GitHub Desktop.
Save lperrin/a93e3d8d15bbb1f56fa5 to your computer and use it in GitHub Desktop.
$window.jsapi = {
refresh: function () {
emitRootScope('refresh');
},
search: function (query) {
$rootScope.$apply(function () {
locations.search(query);
});
},
composeNewMessage: function () {
emitRootScope('compose_new_message');
},
toggleArchiveConversation: function () {
emitRootScope('toggle_archive_conversation');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment