separ1 separ1 - 1 year ago 71
AngularJS Question

How to add focus on the cancel label of the popup?

I have this popup function. It has a template for the pop up. Has one delete and cancel button. I want to have focus on the cancel button when the popup opens. How can i do that?

$scope.Popup = function(funcname){
id: '',
title: '',
scope: $scope,
template: '<div class=""><span>Delete the selected item?</span></div>',
success: {
label: 'Delete',
fn: function(){
//Do Something
cancel: {
label: 'Cancel',
fn: //Do Something


Answer Source

Versions of JS differ you may or not need the # to identify the object.





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download