I'm trying to pass some markup to the cordova email plugin like so:
window.cordova.plugins.email.open({
to: '',
subject: 'Test',
body: '<p>Test body</p>',
isHtml: true
});
This works fine, but I need to pass a lot more markup in the body property, and from what I understand, this kind of thing should be in a view, rather than the controller. So I've been trying various methods to load a view and pass it to the plugin.
Reading this post about using $templateCache and $compile), I could do something like this:
var template = $templateCache.get('email-results.html');
var email = $compile(template)($scope);
The email
var is an object after this code with the right info in it, but accessing the properties of this object not only feels wrong, but also doesn't work very well because the markup still has angularjs expressions in it.