AngularJS BlockUI using page loading time
Step 1
We are following some AngularJS BlockUI reference files in the below code:
- <link rel="stylesheet" href="path-to-block-ui/angular-block-ui.min.css"/>
- <script src="path-to-block-ui/angular-block-ui.min.js"></script>
Step2
BlockUI in your main Angular module.
- angular.module('myApp', ['blockUI'])
Step3
Your AngularJS Controller.js page.
- angular.module('myApp').controller('MyController', function($scope, blockUI)) {
- $scope.onSave = function(item) {
- blockUI.start();
-
- blockUI.stop();
- }
- }
Just call any event from blockUI.start() and blockUI.stop().
Step4
Put this code inside your cshtml page.
- <div block-ui='' myBlockUI''>
- <p>Loading..</p>
- </div>
I hope this AngularJS BlockUI is helpful for you.