My Cordova application is built with angular.js and consists of the following 2 files:
app.html
<div ng-controller="MyAppCtrl as myApp" ng-class="myApp.isWindows() ? 'windows' : ''">
and app.controller
MyAppCtrl.$inject = ['$scope'];
function MyAppCtrl($scope) {
var vm = this;
vm.isWindows = isWindows;
}
function isWindows() {
return true;
}
I need to perform a check within the isWindows
function, and if the condition is met - returning true
to apply the windows
class in the HTML. However, this functionality is currently not working for me. I came across a tutorial that had a similar example, but it's not functioning as expected. Can anyone provide assistance?