2
我是移動開發的新手,並且努力嘗試使用Azure進行身份驗證。我正在使用Mac進行我的開發工作。我創建了基於sidemenu模板的Ionic項目,並在其中添加了插件「cordova-plugin-ms-adal」。爲了確保代碼正常工作,我添加了以下幾行來執行登錄方法。我收到錯誤 - 「VM370:1 Uncaught ReferenceError:Microsoft is not defined(...)」科爾多瓦/ Ionic框架與ADAL合作
真心感謝您的幫助。
$scope.doLogin = function() {
console.log('Doing login', $scope.loginData);
var AuthenticationContext = new Microsoft.ADAL.AuthenticationContext("https://login.microsoftonline.com/abcinc.onmicrosoft.com");
};
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">
<title></title>
<link href="lib/ionic/css/ionic.css" rel="stylesheet">
<link href="css/style.css" rel="stylesheet">
<!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
<link href="css/ionic.app.css" rel="stylesheet">
-->
<!-- ionic/angularjs js -->
<script src="lib/ionic/js/ionic.bundle.js"></script>
<!-- cordova script (this will be a 404 during development) -->
<script src="cordova.js"></script>
<!-- your app's js -->
<script src="js/app.js"></script>
<script src="js/controllers.js"></script>
</head>
<body ng-app="starter">
<ion-nav-view></ion-nav-view>
</body>
</html>