I’ve got log in working but when I try to logOut the Parse user it doesn’t work (taking out Parse.User.logout() allows the alert to pop up). Console says 1 999696 error Error: undefined is not a function (evaluating ‘Parse.User.logout()’). Suggestions? Im new to coding
controller
> .controller('ProfileCtrl', function ($scope, $state){
> $scope.logoutUser = function(){
> Parse.User.logout();
> alert("success!");
> $state.go('login');
> };
> });
tab.profile.html
<ion-view view-title="Profile">
<ion-content padding="true" class="has-header">
<button class="button button-stable button-block" ng-click="logoutUser()">Log Out</button>
</ion-content>
</ion-view>