Skip to content

Commit fd73d84

Browse files
committed
added ng-cloak
1 parent 24aa0d2 commit fd73d84

File tree

2 files changed

+49
-32
lines changed

2 files changed

+49
-32
lines changed

assets/app/app.styl

+17-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@ textgrey = rgb(180,180,180)
1313
@css{
1414
*, *:before, *:after {
1515
-moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
16-
}
16+
}
17+
div[ng-app][ng-cloak] {
18+
display: none;
19+
opacity: 0;
20+
}
21+
div[ng-app] {
22+
opacity: 1;
23+
-webkit-transition: 1s 1s ease-out;
24+
-moz-transition: 1s 1s ease-out;
25+
-o-transition: 1s 1s ease-out;
26+
-ms-transition: 1s 1s ease-out;
27+
transition: 1s 1s ease-out;
28+
}
1729
}
1830

1931
html, body
@@ -34,6 +46,10 @@ body
3446
left 4rem
3547
z-index 9999
3648

49+
div[ng-cloak]
50+
display none
51+
opacity 0
52+
3753
@import './header.styl'
3854

3955
@import './footer'

views/home/index.handlebars

+32-31
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,42 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
66
<link rel="stylesheet" href="/styles/app.css">
77
</head>
8+
<body>
9+
<div ng-app="contrast" ng-cloak="true">
810

9-
<body ng-app="contrast">
10-
11-
<header ng-controller="headerCtrl">
12-
<div ng-class="{notification: isNotifications, header: true}">
13-
<h1>Contrast.io</h1>
14-
<div class="message">
15-
<a ng-click="leaveNotification()">&#123;&#123;notification.text&#125;&#125;</a>
16-
<div class="quit" ng-click="isNotifications=false">X</div>
17-
</div>
18-
<nav>
19-
<div class="hamburger">
20-
<a href="#!">:::</a>
21-
<div class="dropdown">
22-
<a href="#/">Home</a>
23-
<a href="#/profile" ng-show="isLoggedIn">Profile</a>
24-
<a href="#/challenges" ng-show="isLoggedIn">Challenges</a>
25-
<a href="#/requests" ng-show="isLoggedIn">Requests</a>
26-
<a href="#/mychallenges" ng-show="isLoggedIn">My Challenges</a>
27-
<a href="#/login" ng-show="!isLoggedIn">Login</a>
28-
<a href="#/signup" ng-show="!isLoggedIn">Sign Up</a>
29-
<a href="#/logout" ng-show="isLoggedIn">Logout</a>
30-
</div>
11+
<header ng-controller="headerCtrl">
12+
<div ng-class="{notification: isNotifications, header: true}">
13+
<h1>Contrast.io</h1>
14+
<div class="message">
15+
<a ng-click="leaveNotification()">&#123;&#123;notification.text&#125;&#125;</a>
16+
<div class="quit" ng-click="isNotifications=false">X</div>
3117
</div>
32-
</nav>
33-
</div>
34-
</header>
18+
<nav>
19+
<div class="hamburger">
20+
<a href="#!">:::</a>
21+
<div class="dropdown">
22+
<a href="#/">Home</a>
23+
<a href="#/profile" ng-show="isLoggedIn">Profile</a>
24+
<a href="#/challenges" ng-show="isLoggedIn">Challenges</a>
25+
<a href="#/requests" ng-show="isLoggedIn">Requests</a>
26+
<a href="#/mychallenges" ng-show="isLoggedIn">My Challenges</a>
27+
<a href="#/login" ng-show="!isLoggedIn">Login</a>
28+
<a href="#/signup" ng-show="!isLoggedIn">Sign Up</a>
29+
<a href="#/logout" ng-show="isLoggedIn">Logout</a>
30+
</div>
31+
</div>
32+
</nav>
33+
</div>
34+
</header>
3535

36-
<div class="container">
37-
<div ui-view></div>
36+
<div class="container">
37+
<div ui-view></div>
38+
</div>
39+
<footer>
40+
&copy; 2014. All Rights Reserved.
41+
<script src="/js/app.js"></script>
42+
</footer>
3843
</div>
39-
<footer>
40-
&copy; 2014. All Rights Reserved.
41-
<script src="/js/app.js"></script>
42-
</footer>
4344
</body>
4445
</html>
4546

0 commit comments

Comments
 (0)