The following error is appearing in the Console for the JSFiddle at the link below:
Uncaught Error: [$injector:modulerr] Failed to instantiate module myApp due to:
Error: [$injector:nomod] Module 'myApp' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
http://jsfiddle.net/knot22/3q5fk214/30/
Here is the HTML:
<div ng-app="myApp">
<div ng-controller="interestRatesController as vm">
<div>ui-percentage-value test</div>
<form name="vm.formContainer.form">
<div>
<label>Interest Rate 1</label>
<input type="text" ng-model="vm.interestRate1">
</div>
<div>
<label>Interest Rate 2</label>
<input type="text" ui-percentage-value ng-model="vm.interestRate2">
</div>
<div>
<label>Interest Rate 3</label>
<input type="text" ui-percentage-value ui-percentage-mask min="0.00" max="100.0" ng-model="vm.interestRate3">
</div>
<div>
<button ng-click="vm.save()">
Submit
</button>
</div>
</form>
<hr>
<div>
{{vm}}
</div>
</div>
</div>
Here is the JS:
angular.module('myApp', [])
.controller("interestRatesController", ['$scope', function ($scope) {
//var vm = this;
vm.formContainer = {
form: {}
}
vm.save = function () {
vm.msg = 'some message';
}
}]);
What is causing this error?