How to avoid flickering effect in angularjs

Course Queries Syllabus Queries 3 years ago

2.41K 1 0 0 0

User submissions are the sole responsibility of contributors, with TuteeHUB disclaiming liability for accuracy, copyrights, or consequences of use; content is for informational purposes only and not professional advice.

Answers (1)

Post Answer
profilepic.png
manpreet Tuteehub forum best answer Best Answer 3 years ago


Can anybody help me how to fix this flicker effect when view is loading here is my code.

app.config(function($stateProvider,$urlRouterProvider,$routeProvider, $locationProvider,blockUIConfig) {

  $urlRouterProvider.otherwise("/#");

  $stateProvider
      .state('dash', {
          url: "/dash",
          templateUrl: 'views/br_manager/pc_dashboard.html',
          controller:'dashCtrl'
      })
      .state('pass', {
          url: "/pass",
          templateUrl: 'views/br_manager/change_password.html',
          controller:'passwordCtrl'
      })

 .state('classroom', {
            abstract:true,
            url: "/classroom",
            template: '
view style="height:100%">
'
, controller:'classroomManagementCtrl' }) .state('classroom.list', { url: "", templateUrl: 'views/br_manager/CR.html' }) $locationProvider.html5Mode(true); blockUIConfig.message = "Processing ..."; });

following is the code for controller and factory sevrvice

    branchManager.factory('classroomFactory',function($resource,appConfig,$window){
    var factory = {};

    var fetch_classroom_url = appConfig.getMainAPI();
    var authCode = $window.localStorage.getItem("authCode");


   factory.fetchStandardList = function(selectedYear) {
        return $resource(fetch_classroom_url+'/classroom/year/'+ selectedYear, {}, {
            fetch : {
                method : 'get',
                isArray : false,
                headers : { 'Authorization' : authCode },
                interceptor : {
                    response : function(data) {
                        return data;
                    }
                }
            }
        });
    };

    factory.fetchSectionList = function(currentStandard, selectedYear) {
        return $resource(fetch_classroom_url+'/classroom/standard/'+ currentStandard +'/section/year/'
            + selectedYear, {}, 
                                                
0 views
0 shares

No matter what stage you're at in your education or career, TuteeHUB will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.

Similar Forum