What is the better way to add office 365 javascript api library to angular js project?


Officejs library can be used inside angular controller as following way by adding library reference https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js to index page

function sendRequest() {
   // Create a local variable that contains the mailbox.
   var mailbox = Office.context.mailbox;

   mailbox.makeEwsRequestAsync(getItemRequest(mailbox.item.itemId), callback);

function callback(asyncResult)  {
   var result = asyncResult.value;
   var context = asyncResult.context;

   // Process the returned response here.

is there any better way to handle these kind of libraries inside angular js project ?


Yeoman generater is there. it has option to create angular project

Answered By – InfoÁsith

Answer Checked By – Willingham (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.