hello sir, i am using ionic 1.0 and wanted to use email feature in ionic.
i followed this.
ngCordova in dependency.
angular.module('mrindia', ['ionic','ngValidateModule','ngCordova']);
i had ngCordova in lib folder.
<script src="lib/ngValidate.js"></script> in index.html
applied code in ForgetCtrl with parameter
.controller('ForgotCntrl', ['$scope','$state','$cordovaEmailComposer','UserStore','$ionicSideMenuDelegate', function($scope,$state,$cordovaEmailComposer,UserStore,$ionicSideMenuDelegate){
now mailing code:
`$cordovaEmailComposer.isAvailable().then(function() {
// is available
}, function () {
console.log("Mailing is not available");
});
var email = {
to: $scope.mailObj.mail,
subject: 'Testing',
body: 'Testing',
isHtml: true
};
$cordovaEmailComposer.open(email).then(null, function () {
console.log("Email closed");
});
};`
i am sure that $scope.mailObj.mail is not null. please help.
Error is coming when trying to run in android with
I'm not sure if there are any bugs with ngCordova related to this plugin. But as far as I know, the email plugin is currently broken and the developer hasn't fixed it yet.
hello sir, i am using ionic 1.0 and wanted to use email feature in ionic. i followed this.
angular.module('mrindia', ['ionic','ngValidateModule','ngCordova']);
<script src="lib/ngValidate.js"></script>
in index.html.controller('ForgotCntrl', ['$scope','$state','$cordovaEmailComposer','UserStore','$ionicSideMenuDelegate', function($scope,$state,$cordovaEmailComposer,UserStore,$ionicSideMenuDelegate){
`$cordovaEmailComposer.isAvailable().then(function() { // is available }, function () {
i am sure that $scope.mailObj.mail is not null. please help.
Error is coming when trying to run in android with
ionic run -lc android