【问题标题】:What is the better way to add office 365 javascript api library to angular js project?将office 365 javascript api库添加到angular js项目的更好方法是什么?
【发布时间】:2015-04-20 17:26:50
【问题描述】:

Officejs 库可以通过将库引用https://appsforoffice.microsoft.com/lib/1.1/hosted/office.js 添加到索引页来在 Angular 控制器中使用,方法如下

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.
}

有没有更好的方法来处理 angular js 项目中的这类库?

【问题讨论】:

标签: angularjs angularjs-directive angularjs-scope office365 restangular


【解决方案1】:

Yeoman 生成器就在那里。它可以选择创建角度项目 https://www.npmjs.com/package/generator-office

【讨论】:

    猜你喜欢
    • 2014-12-08
    • 2019-10-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-03-22
    • 2016-01-14
    • 1970-01-01
    相关资源
    最近更新 更多