McNull / angular-block-ui

AngularJS Block UI Module

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to override default message with manual calls?

razblack opened this issue · comments

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 :(