Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to Prevent Flickering in Angularjs While Page Loads?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.56k
    Comment on it

    Hello All,

    We are sometimes in a situation when a particular page loads up on the browser and there are some incomplete contents, raw code displayed in the browser while Angular Js is loaded.

     

    So in order to prevent the browser to show the raw content, we use angular js built in directive ng-cloak

     

    AngularJS built in directives has a prefix which begins with the ng namespace. It is used to extend HTML elements attribute.

     

    ng-cloak is used to avoid the incomplete contents, raw code displayed in the browser which does not take any parameters.

     

    Syntax:

    <element ng-cloak></element>

     

    Example:

    <body ng-controller="AbcController" ng-cloak>
    <h3>Example ng-cloak</h3>
    <ol >
    <li ng-repeat="item in myData">
        {{item.title}}
    </li>
    </ol>
    </body>

     

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: