I am attempting to trigger a function when a button is clicked...
Here is the button in question:
<body ng-app="starter">
<div ng-controller="convertController">
<button class="button button-block button-balanced" ng-click="convert()">
Convert
</button>
</div>
And here is the corresponding function:
var myApp = angular.module('starter',['ionic']);
myApp.controller('convertController', ['$scope', function($scope) {
$scope.convert = function(){
alert("convert");
}
}]);
I am puzzled as to why the function fails to execute upon clicking the button. Any insights?