Site da Oficina Itapeti

main.js 1.4KB

    'use strict'; /** * @ngdoc function * @name siteOficinaItapetiApp.controller:MainCtrl * @description * # MainCtrl * Controller of the siteOficinaItapetiApp */ angular.module('siteOficinaItapetiApp') .controller('MainCtrl', [ '$window', '$scope', '$rootScope', '$http', function ($window, $scope, $rootScope, $http) { $window.scrollTo(0, 0); $scope.Math = window.Math; $scope.laser_cut = { value: 0, options: { floor: 0, ceil: 20, step: 0.5, minLimit: 0.5, maxLimit: 20, precision: 1 }, cost: [120, 120, 120, 110, 110, 100, 100, 100, 100, 90, 90, 90, 90, 90, 80, 80, 80, 80, 80, 70], value_project: 0, options2: { floor: 0, ceil: 8, step: 0.5, minLimit: 0, maxLimit: 8, precision: 1 }, cost2: 50 } $scope.sendMessage = function(msgData){ console.log("> Sending message from " + msgData.name); var req = { method: 'POST', url: 'send_contact_mail.php', data: { to: "oficina.itapeti@gmail.com", from: msgData.email, subject: msgData.subject, msg: msgData.message } } $http(req).then(function(data){ console.log(data); }); }; }]);