Skip to content

Instantly share code, notes, and snippets.

@walidvb
Created August 11, 2014 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save walidvb/7a0298c81b237f94dbb1 to your computer and use it in GitHub Desktop.
Save walidvb/7a0298c81b237f94dbb1 to your computer and use it in GitHub Desktop.
- @price_present = true
%span{"ng-cloak" => true, "ng-switch" => "currency"}
%span.animated{"ng-switch-when" => 'gbp'}= number_to_currency(locals[:gbp].to_d/100, {:unit => @currencies['gbp']})
%span.animated{"ng-switch-when" => 'eur'}= number_to_currency(locals[:eur].to_d/100, {:unit => @currencies['eur']})
%span.animated{"ng-switch-when" => 'usd'}= number_to_currency(locals[:usd].to_d/100, {:unit => @currencies['usd']})
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
display: none !important;
}
/* starting animations */
.animated{
-webkit-transition:.5s linear all;
transition:.5s linear all;
overflow: hidden;
}
/* destination animations */
.animated.ng-enter, .animated.ng-leave.ng-leave-active{
max-height: 0px;
opacity: 0;
position: absolute;
}
.animated.ng-enter-active, .animated.ng-leave{
max-height: 900px;
opacity: 1;
position: absolute;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment