Base solution for your next web application
Open Closed

abp.ui.setBusy() is not working #442


User avatar
0
abu created

i added the following bundles in the head of cshtml page.

@Styles.Render("~/Bundles/App/vendor/js")

using abp.ui.setBusy() in angularjs page as follows:

vm.logincheck = function () {
              
                abp.ui.setBusy( //Set whole page busy until getTasks complete
                   null,
                employeeService.getEmployee(
                    vm.logininfo
                ).success(function (data) {
                    vm.employees = data.employees;
                    var detail = vm.employees;
                    sessionStorage.setItem("detail", JSON.stringify(detail));
                    $location.path('/bidding');
                })
             );
              
            };

please anyone help me to find the issue ...????

thanks in advance


8 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    What do you mean by not working. Are you getting an error. Can you test it in chrome console. Just write this:

    abp.ui.setBusy();

    Is that working? This is working for the default template (<a class="postlink" href="http://aspnetboilerplate.com/Templates">http://aspnetboilerplate.com/Templates</a>).

  • User Avatar
    0
    abu created

    sir when i use abp.ui.setBusy() then it work but when we call angularjs function and it take time to fetch data or to insert or to login then its not working no spin is visible to user.

    thank you for your kind information after so many days.

  • User Avatar
    0
    hikalkan created
    Support Team

    Can you share part of your code?

  • User Avatar
    0
    abu created

    this is my code:

    (function () {
        var controllerId = 'app.views.addemployeeform';
        angular.module('app').controller(controllerId, [
            '$scope', '$location', 'abp.services.ameba.employee', function ($scope, $location, employeeService) {
                var vm = this;
                vm.employeeinfo = {};
                var localize = abp.localization.getSource('Ameba');
                vm.companyemployeeRegister = function () {
                    abp.ui.setBusy( //Set whole page busy until getTasks complete
                       null,
                    employeeService.createCompanyEmployee(vm.employeeinfo).success(function () {
                        abp.notify.info("Registration Completed please login to continue");
                        $location.path('/login')
                    })
    
                    );
                };
    
    
            }]);
    })();
    
  • User Avatar
    0
    hikalkan created
    Support Team

    Hi,

    You are redirecting your page to another page ($location.path('/login')). So, maybe you don't see while it's working since page is being redirected. Can you try by removing this line?

  • User Avatar
    0
    abu created

    thank you sir

    its working when i removed the line you guide me.. but how we show setBusy() when we redirect to another page..???

  • User Avatar
    0
    apexdodge created

    I think what you are trying to achieve is different than what abp.ui.setBusy() offers. I would google for "Angularjs Page Transitions" and see if anything comes up of use.

  • User Avatar
    0
    achan created

    <cite>apexdodge: </cite> I think what you are trying to achieve is different than what abp.ui.setBusy() offers. The <a class="postlink" href="https://peblueprint.com/bathmate-review">https://peblueprint.com/bathmate-review</a> bathmate works too. I would google for "Angularjs Page Transitions" and see if anything comes up of use.

    Hi apexdodge i googled it and couldn't really find any solid tutorials on page transitions. Do you know of any?