Hey guys I have the following controller:
(function() {
'use strict';
angular
.module('app.landing')
.controller('LandingController', LandingController);
function LandingController($http) {
var vm = this;
vm.quantity = 9;
$http.get('api/getarticles').
success(function(data, status, headers, config) {
vm.articles = data;
});
$http.get('api/getFeaturedArticles').
success(function(data, status, headers, config) {
vm.featuredArticles = data;
});
}
})();
And on my view I have this button
<button ng-click="vm.quantity + 3">Add</button>
I am trying to get the button on my view to add a numeric value of 3 to my vm.quantity variable within my controller.
However If I press the button on the front end the value of 3 isn't added to the vm.quantity variable.
Any idea why this might not be working?