Last active
August 29, 2015 14:12
Angular.js ngDialog example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('demo', ['ngDialog']); | |
app.controller('MainCtrl', function ($scope, ngDialog) { | |
$scope.openContactForm = function() { | |
ngDialog.openConfirm({template: 'contact_us.html', | |
scope: $scope //Pass the scope object if you need to access in the template | |
}).then( | |
function(value) { | |
//save the contact form | |
}, | |
function(value) { | |
//Cancel or do nothing | |
} | |
); | |
}; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment