我正在开发离子移动应用程序。我已经按照这些文件https://github.com/azure/azure-mobile-apps-js-client和https://github.com/azure-appservice-samples/ContosoMoments/tree/master/src使用Azure移动应用程序时出错 - Javascript客户端SDK
当我在我的控制器中注入'mobileServicesClient'时,出现未知提供者错误。 如果我在功能上直接使用这样
var clientRef = new MobileServiceClient('https://******.azurewebsites.net');
clientRef.login('aad').then(function(result){ console.log(result); },function(result){ console.log(result); }
我得到错误:“MobileServiceClient没有定义”
使用适用于Azure移动应用程序的Apache Cordova插件,我能够进行身份验证。我还为JavaScript SDK及其工作找到了此https://ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.2.7.min.js。我想要构建混合移动应用程序。那么JavaScript SDK会更好还是客户端SDK? – devangi
对于H5应用程序,使用JS SDK以及移动应用程序,建议使用客户端SDK。正如您可以在https://github.com/Azure/azure-mobile-apps-js-client/tree/master/sdk/上所见,将SDK分成两个平台('web'&'cordova') SRC /平台。所以在认证和表操作中几乎是一样的,但应该是一些特殊的平台。 –
对于Cordova应用程序,您可以参考https://docs.microsoft.com/zh-CN/azure/app-service-mobile/app-service-mobile-cordova-how-to-use-client-library,以及对于H5应用程序,您可以参考https://docs.microsoft.com/zh-cn/azure/app-service-mobile/app-service-mobile-html-how-to-use-client-library –