Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Side by Side Diff: third_party/pkg/angular/lib/directive/ng_cloak.dart

Issue 124053002: Adding Angular and dependent packages for testing (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 part of angular.directive;
2
3 /**
4 * The `ngCloak` directive is used to prevent the Angular html template from
5 * being briefly displayed by the browser in its raw (uncompiled) form while
6 * your application is loading. Use this directive to avoid the undesirable
7 * flicker effect caused by the html template display.
8 *
9 * The directive can be applied to the `<body>` element, but typically a
10 * fine-grained application is preferred in order to benefit from progressive
11 * rendering of the browser view.
12 *
13 * `ngCloak` works in cooperation with a css. Following is the css rule:
14 *
15 * [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
16 * display: none !important;
17 * }
18 *
19 * When this css rule is loaded by the browser, all html elements (including
20 * their children) that are tagged with the `ng-cloak` directive are hidden.
21 * When Angular comes across this directive during the compilation of the
22 * template it deletes the `ngCloak` element attribute, which makes the compiled
23 * element visible.
24 */
25 @NgDirective(selector: '[ng-cloak]')
26 @NgDirective(selector: '.ng-cloak')
27 class NgCloakDirective {
28 NgCloakDirective(dom.Element element) {
29 element.attributes.remove('ng-cloak');
30 element.classes.remove('ng-cloak');
31 }
32 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698