i'm new mobile development , struggling auth working azure. i'm using mac development effort. i've created ionic project based in sidemenu template, added plugin "cordova-plugin-ms-adal" it. make sure code works, added following few line dologin method. error - "vm370:1 uncaught referenceerror: microsoft not defined(…)"
truly appreciate help.
$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), uncomment below , remove 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 404 during development) --> <script src="cordova.js"></script> <!-- 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>
i'm not allowed comment yet - hence in answer
i created ionic tab sample app scratch
added cordova-plugin-ms-adal
added nav button 1 of views
<ion-nav-buttons side="primary"> <button class="button" ng-click="dologin()"> login </button> </ion-nav-buttons>
added dologin method controller of view
.controller('dashctrl', function ($scope) { $scope.dologin = function () { console.log('doing login'); var authenticationcontext = new microsoft.adal.authenticationcontext("https://login.microsoftonline.com/abcinc.onmicrosoft.com"); }; })
do have same way?
Comments
Post a Comment