formations/javascript/angular/exercices/karma/app/app.js

13 lines
226 B
JavaScript
Raw Normal View History

2015-04-10 00:30:02 +02:00
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;
};
}]);