formations/javascript/angular/exercices/karma/app/app.js
2019-03-25 13:14:16 +01:00

13 lines
226 B
JavaScript

var myApp = angular.module('myApp', []);
myApp.controller('ExoCtrl', ['$scope', function($scope) {
$scope.val1 = 1;
$scope.val2 = 2;
$scope.add = function() {
$scope.result = $scope.val1 + $scope.val2;
};
}]);