From b438319680c24402ed537e07d08a262375c95a74 Mon Sep 17 00:00:00 2001 From: Jeremy Guiselin <jeremy.guiselin@student.ecp.fr> Date: Tue, 7 Feb 2017 17:30:03 +0100 Subject: [PATCH] Update controller.js add send email scope function --- www/js/pages/info/controller.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/www/js/pages/info/controller.js b/www/js/pages/info/controller.js index 34406d1..415a384 100644 --- a/www/js/pages/info/controller.js +++ b/www/js/pages/info/controller.js @@ -34,6 +34,23 @@ $scope.myGoBack = function() { $ionicHistory.goBack(); }; + + $scope.sendEmail = function () { + //cordova plugin add https://github.com/jcjee/email-composer.git + if(window.plugins && window.plugins.emailComposer) { + window.plugins.emailComposer.showEmailComposerWithCallback(function(result) { + console.log(result); + }, + "", // Subject + "", // Body + ["contact@betskills.com"], // To + null, // CC + null, // BCC + false, // isHTML + null, // Attachments + null); // Attachment Data + } + } } angular.module('starter') -- GitLab