Guest User

Untitled

a guest
Dec 12th, 2018
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. var app = angular.module("expensesApp",[]);
  2.  
  3. const print = console.log;
  4.  
  5. //Controlador
  6. app.controller('ExpensesViewController',['$scope',function($scope){
  7. $scope.expense = {
  8. description : 'comida',
  9. amount: 5
  10. };
  11.  
  12. $scope.incrementarMonto = function(){
  13. //$scope.expense.amount += 1;
  14. $scope.expense.amount++;
  15. //print('%c Incremnetando: '+$scope.expense.amount,'background-color:#224A8D;color:#55DD80')
  16. }
  17.  
  18. $scope.items = [{
  19. name:'pizza',
  20. ingredients: ['cheese','tomato','oregano','salt','lemon']
  21. },{
  22. name:'tortilla',
  23. ingredients: ['butter','salt','pepper','garlic']
  24. },{
  25. name:'cake',
  26. ingredients: ['cream','suggar']
  27. }];
  28.  
  29. $scope.title = "Curso Angular JS";
  30. $scope.msg = "Bienvenidos al curso Angular JS.";
  31. print("%c Angular JS funcionando!!","background-color:black; color:lime;");
  32. }]);
Add Comment
Please, Sign In to add comment