Dialog-for-Angular-BootStrap3

Dialog module( notify,confirm,custom alert ) for angularjs which support bootstrap3

Homepage

Added by: Sam Deering

GitHub

Repository

bachvtuan/dialog-for-angular-bootstrap3

Stats

Stars: 0

Watchers: 0

Forks: 0

Author

Tuan
Tuan

Module Description

Dialog-for-Angular-BootStrap3

This dialog module is modified from the module which support angularjs bootstrap v0.6.0. it supported twitter bootstrap 2.3.2 at here Link
Since angujarjs-bootstrap updated to v0.10.0. that module doesn't display properly with twitter bootstrap 3.
So I modified it to working well with twitter bootstrap 3.
##Here is 4 methods in Dialogs module

  • error : display error message
  • notify : display notification message
  • confirm: confirm user's choice
  • create: support create custom modal template for specific purposes.

Demo link
You can take a look at example how to use it.

###Below is quick guide:
Include ui.bootstrap and dialogs module

 var app = angular.module('app', [ 
  'ui.bootstrap',
  'dialogs'
 ]);

In your controller : to use error, confirm, notify like this

$scope.error = function(){
  $log.debug('Error');
  $dialogs.error("This is error messsage");
}

$scope.confirm = function(){
  $log.debug('Confirm');
  var dlg = $dialogs.confirm('Please Confirm','Are you under 20 year olds ?');
  dlg.result.then(function(btn){
    $dialogs.notify('Result','You clicked yes');
  });
}

$scope.notify = function(){
  $log.debug('Notify');
  $dialogs.notify('My title','You can override this messsage');
}

About custom modal, You can take a look at example. Basically, You create custom controller and custom template . when done, You can use code below to show custom modal:

 $dialogs.create(input_modal_template_ url,custom_controller,data,callback);

Module stats last updated: 2015-04-15 19:44:25

Disclaimer: Some data on this page may have been gathered from the authors GitHub respository. If you see any mistakes or outdated information please let us know. Thanks!