McNull / angular-block-ui

AngularJS Block UI Module
MIT License
349 stars 108 forks source link

How to override default message with manual calls? #103

Open razblack opened 8 years ago

razblack commented 8 years ago

I have setup in my app config a default message for all blockUI.start(); calls.

However, i have a few cases where I would like to override that message when I need to manual block an element or for something special.

// Get the reference to the block service. var myBlockUI = blockUI.instances.get('myBlockUI');

// Start blocking the element. myBlockUI.start();

when I pass in a message to the myBlockUI.start('my special messsage');

it does not seem to override the default message I have configured :(

when I instantiate my var, do I also need to set something like: var myBlockUI = blockUI.instances.get('myBlockUI'); myBlockUI.message = 'my special message';

so when myBlockUI.start(); is called, the default gets overridden?

I've tried that, but it doesn't seem to work :(