UI blocker and simple loading spinner for Meteor apps
Inspired by atmospherejs.com
This package simply works after adding into your project, - additional setup isn't required
Installation
meteor add ostrio:uiblocker
Usage
Block screen:
1UIBlock.block() 2UIBlock.block 'some message'
Unblock screen:
1UIBlock.unblock()
Meteor.status
example:
1Tracker.autorun -> 2 if Meteor.status().connected 3 UIBlock.unblock() 4 else 5 UIBlock.block Meteor.status().status
Meteor.call
example:
1UIBlock.block 'Sending email...' 2Meteor.call 'sendEmail', subject, body, (err, res) -> 3 UIBlock.unblock()
Recommended DOM structure
Recommended to have main block element right after body
tag, which wraps all website content. ID and Class name doesn't make any sense, in example we will use [tw]bootstrap's .container
as a wrapper for content.
html head //- ... body .container //- All content here