src/angular-modal-service.js
function (template, templateUrl) {
                    var deferred = $q.defer();
                    if (template) {
                        deferred.resolve(template);
                    } else if (templateUrl) {
                        $templateRequest(templateUrl, true)
                            .then(function (template) {
                                deferred.resolve(template);
                            }, function (error) {
                                deferred.reject(error);
                            });
                    } else {
                        deferred.reject("No template or templateUrl has been specified.");
                    }
                    return deferred.promise;
                }
function (template, templateUrl) {
                    var deferred = $q.defer();
                    if (template) {
                        deferred.resolve(template);
                    } else if (templateUrl) {
                        $templateRequest(templateUrl, true)
                            .then(function (template) {
                                deferred.resolve(template);
                            }, function (error) {
                                deferred.reject(error);
                            });
                    } else {
                        deferred.reject("No template or templateUrl has been specified.");
                    }
                    return deferred.promise;
                }
function ( template , templateUrl ) { var deferred = $q . defer ( ) ; if ( template ) { deferred . resolve ( template ) ; } else if ( templateUrl ) { $templateRequest ( templateUrl , true ) . then ( function ( template ) { deferred . resolve ( template ) ; } , function ( error ) { deferred . reject ( error ) ; } ) ; } else { deferred . reject ( "No template or templateUrl has been specified." ) ; } return deferred . promise ; }
Returns a promise which gets the template, either from the template parameter or via a request to the template url parameter.
Returns a promise which gets the template either from the template parameter or via a request to the template url parameter .