Skip to content

Instantly share code, notes, and snippets.

@kis
Created September 9, 2015 12:56
Show Gist options
  • Save kis/e7f78c242bb557e38edd to your computer and use it in GitHub Desktop.
Save kis/e7f78c242bb557e38edd to your computer and use it in GitHub Desktop.
modal service
(function() {
'use strict';
angular
.module('uaMain')
.factory('collegeModalService', collegeModalService);
/** @ngInject */
function collegeModalService($http, $modal, URL, collegeService) {
return {
openCollegeModal: _openCollegeModal
};
function _openCollegeModal(collegeId, data) {
return $modal.open({
animation: true,
templateUrl: 'app/components/college-modal/college-modal.html',
controller: 'CollegeModalCtrl',
size: 'lg',
resolve: {
collegeInfo: function () {
return collegeService.getCollegeData(collegeId);
},
collegeAddData: function () {
return {
tab: data.tab,
rank: data.rank,
name: data.name
};
}
}
});
}
}
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment