创建了一个基于Ionic2空白模板的Ionic2应用程序。使用Visual Studio 2015更新2.设置Azure移动服务帐户以用作后端。我已经安装了Azure移动应用插件(双击config.xml并选择Azure移动应用,然后单击安装) /config.xml摘录:
<plugin name="cordova-plugin-ms-azure-mobile-apps" version="2.0.0-beta4" />我已经安装了azure-mobile-app.d.ts,如下所示:https://www.nuget.org/packages/azure-mobile-apps.TypeScript.DefinitelyTyped/。VS2015智能感知认为代码有效。
但是,尝试访问chrome控制台中的后端时出现错误:未定义WindowsAzure。
client: WindowsAzure.MobileServiceClient;
...
client = new WindowsAzure.MobileServiceClient('removed url for security');发布于 2016-06-23 02:25:09
我能够让WindowsAzure.MobileServiceClient工作的唯一方法是在我的提供程序中声明一个WindowsAzure变量,然后在index.html中手动包含脚本文件MobileServices.Cordova.js作为脚本引用。这不是很理想。有一些打字文件在那里,但它们不再是最新的。
https://stackoverflow.com/questions/37803321
复制相似问题