Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple templateUrls #126

Open
smohammedyasin opened this issue May 16, 2018 · 2 comments
Open

Multiple templateUrls #126

smohammedyasin opened this issue May 16, 2018 · 2 comments

Comments

@smohammedyasin
Copy link

hello,

is it possible to use multiple templateUrls based

currently i try to access using below code. but not working,

 var Div1= blockUI.instances.get('Div1');
            //stop all playing before load
            Div1.start({
                    templateUrl: '/Scripts/pages/loading.html'
                });
       $timeout(function() {
  // Stop the block after some async operation.
                Div1.stop();
           }, 1000);

 var Div2= blockUI.instances.get('Div2');
            //stop all playing before load
            Div2.start({
                    templateUrl: '/Scripts/pages/loading2.html'
                });
       $timeout(function() {
  // Stop the block after some async operation.
                Div2.stop();
           }, 1000);
@vilispatel
Copy link

vilispatel commented May 21, 2018

First you have to Disable auto body block.

Write this code in app.js config file(for disable auto body block).
// Disable auto body block
blockUIConfig.autoInjectBodyBlock = false;

And then you can change template html anywhere(in config file) like,
blockUIConfig.template = '/Scripts/pages/loading1.html'.

Or // Put template for Block messages here.
blockUIConfig.template = div class="block-ui-message-container"
div class="block-ui-message"
span i class="fa fa-circle-o-notch fa-spin" /i
 {{ state.message }}
/span
p (press ESC to cancel) /p
/div
/div;

Note:(i didn't write < and > in html.)
See if this thing workout ! Best Luck.

@smohammedyasin
Copy link
Author

@vilispatel Thank you for response,

as per your script's idea, it can be use one template per page, but, in my case i have multiple blocks in one page and i want to show different, different templates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants