Angular UI Bootstrap modals load template Solution
simple in angularjs modal popup ,All was very well and using Angular.js using libs to together with Twitter Bootstrap load template totally made my day. so then I needed or provided to show a modal dialog box to Dom elements. I know how to do this stuff so I stumbled upon open or closed the Angular UI directives for using the Bootstrap this seemed great.means other sense to I mean, that’s just awesome. as well as to Using the powerful check of Angular’s directives should all the get these modals up dialog and running super very fast.
Simple Installation check
[php]
angular.module(‘myModule’, [‘ui.bootstrap’]);
[/php]
CSS
[php]
.nav, .pagination, .carousel, .panel-title a { cursor: pointer; }
[/php]
IMP Note : You must load the fisrt the ui.boostrap module after the libs of angularjs file.For Using Angular UI Bootstrap modals
You have to include following after angular.min.js file
[php]
http://..//ui-bootstrap-custom-tpls-0.12.0.min.js
[/php]
Solve the UI Bootstrap modal error: Failed to load template
[php]
Failed to here in angularjs load template: template/modal/backdrop.html example error
[/php]
Make the sure you’re very easy way to the linking to the UI Bootstrap used library with the HTML templates included (Like as a ui-bootstrap-tpls.js) and not simple any of the plain UI Bootstrap libs = library (Like as a ui-bootstrap.js).
[php]
//angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.10.0.js
[/php]
Full Example of resolve error for Angular-UI Bootstrap alert service for Angular.js
Script.js
[php]
(function(){
var ng4app = angular.module(‘cmsRecipesModule’, [‘ui.bootstrap’]);
ng4app.controller(‘cmprojectCtrl’, [
‘$scope’,
‘$rootScope’,
‘recipeService’,
‘$modal’,
function($scope, $rootScope, recipeService, $modal){
$scope.recipes = recipeService.recipes;
$scope.removereceipt = function(id) {
$modal.open({
templateUrl: ‘/templates/modal.html’,
controller: ‘popupmodalCtrl’
});
}
}
]);
ng4app.controller(‘popupmodalCtrl’, [
‘$scope’,
‘$modalInstance’,
function($scope, $modalInstance){
//display message
console.log(‘instance’);
}]);
})();
[/php]
Body Part
[php]
angular ui bootstrap tutorial
[/php]