Skip to content

Instantly share code, notes, and snippets.

@aquasmit
Created May 31, 2016 06:52
Show Gist options
  • Save aquasmit/9245a304e9d1f8bccb5213a02b00dcae to your computer and use it in GitHub Desktop.
Save aquasmit/9245a304e9d1f8bccb5213a02b00dcae to your computer and use it in GitHub Desktop.
AngularJs ng-cloak directive

ng-cloak works by temporarily hiding the marked up element and it does this by essentially applying a style that does this:

This will remove the flicker effect on the page while data is loading from AngularJs

[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
  display: none !important;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment