I would like to know what is going wrong because when I do the ng-click
function in HTML the {{resultado}}
appears as NaN .
HTML
<button class="button button-full button-positive" ngclick="juntarTotal()">
Juntar os dois campos
</button>
<h3>{{resultado}}</h3>
controller.js
angular.module('app.controllers', [])
.controller('doisnumerosController', function($scope){
$scope.juntarTotal = () => {
$scope.resultado = $scope.valor1 + $scope.valor2;
}
});