9 Replies Latest reply on Apr 3, 2015 8:15 AM by kalaoke

    Angularjs jive app



      I’m trying to make an existing web application a jive app. The existing application is based on the mean.js framework : basically this is an angular.js app served by a node.js server. Our jive instance is a custom hosted instance version

      Following the available documentation (here), I wrote an app.xml file :

      <?xml version="1.0" encoding="UTF-8"?>

      <Module specificationVersion="1">

        <ModulePrefs title="hckApp"

                      description="Description of hckapp"




            <!-- Commonly used features -->

            <Require feature="dynamic-height" />

            <Require feature="jive-core-v2" />

            <Require feature="osapi"/>

            <Require feature="settitle"/>

            <Require feature="views" />

            <Require feature="jive-core-v3" />

            <Require feature="embedded-experiences" />

            <Require feature="actions">

                <Param name="action-contributions">


                    <action id="com.jivesoftware.contentaction"


                            label="My Content Action"





            <!-- Icons: 3 sizes, 16x16, 48x48, 128x128 -->

            <Link rel="Icon"      href="images/icon16.png" />

            <Link rel="MediumIcon" href="images/icon48.png" />

            <Link rel="LargeIcon"  href="images/icon128.png" />


        <Content type="url" view="home" href="APP URL HERE" preferred_height="600" />

        <Content type="url" view="canvas" href="APP URL HERE" preferred_height="600"/>


      After installing the app on our jive instance, it seems to work but apparently the resources referenced in the app.xml file (osapi, ...) are not loaded.

      For example if we write in the home controller of our meansjs application :

      angular.module('core').controller('HomeController', ['$scope', 'Authentication',

        function($scope, Authentication) {

              function getUsersFromResponse(response) {

                  var users = [];

                  if(response.data instanceof osapi.jive.core.User) {


                  } else if (response.data instanceof Array) {

                      users = response.data;


                  return users;


          // This provides Authentication context.

          $scope.authentication = Authentication;

          $scope.selectUser = function () {

                 var callback = function(response) {

                      var users = getUsersFromResponse(response);



                  osapi.jive.core.users.requestPicker({success: callback, multiple: false});




      At runtime, the browser’s javascript console produces an error : “osapi is not defined”

      Any clues?

      Thanks for help.