Dynamic modals


#1

Hello,

I need help with creating multiple modals. Is it possible to use directives? and how would that code look

Thanks


#2
$ionicModal.fromTemplateUrl('templates/catModal.html', function (modal) {
	    	$scope.categoriesModal = modal;
	},{
	  		scope: $scope,
	    	animation: 'slide-in-up',
	    	backdropClickToClose: false
	});

	$ionicModal.fromTemplateUrl('templates/brandsModal.html', function (modal) {
	    	$scope.brandsModal = modal;
	},{
	  		scope: $scope,
	    	animation: 'slide-in-up',
	    	backdropClickToClose: false
	});

	$ionicModal.fromTemplateUrl('templates/mallsModal.html', function (modal) {
	    	$scope.mallsModal = modal;
	},{
	  		scope: $scope,
	    	animation: 'slide-in-up',
	    	backdropClickToClose: false
	});

#3

But what if the modals were to be created dynamically. For instance an ng-repeat generated buttons that would each pop up a different modal on click