oitozero / ngSweetAlert

AngularJS wrapper for SweetAlert
MIT License
616 stars 160 forks source link

option to give a template url instead text for the content #57

Open bsssp opened 8 years ago

bsssp commented 8 years ago

needed: jquery

cann you make a directive for it?

$http.get(templateUrl).then(function(response) {
    var template = angular.element(response.data);
    var linkFn = $compile(template);
    var templateElement = linkFn(scope);

    var elm = element.find("div[name=content]");
    elm.append(templateElement);
 });