Skip to content

Instantly share code, notes, and snippets.

@programmarchy
Created October 29, 2014 05:21
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 programmarchy/64d34ee8083408dbe2f1 to your computer and use it in GitHub Desktop.
Save programmarchy/64d34ee8083408dbe2f1 to your computer and use it in GitHub Desktop.
NoNgShow
<!doctype html>
<html ng-app="test" ng-csp>
<head>
<meta charset="utf-8" />
<title>ngShow Test</title>
<style>
body {
width: 300px;
height: 300px;
background: green;
}
#myctrl {
position: absolute;
width: 100px;
height: 100px;
background: red;
}
/** (uncomment for workaround)
.ng-hide {
display: none;
}
**/
</style>
<script src="angular.min.js"></script>
</head>
<body>
<div id="myctrl" ng-controller="MyCtrl as my" ng-show="false">{{my.x}}</div>
<script>
(function() {
var app = angular.module('test', []);
app.controller('MyCtrl', function() {
this.x = "I should be hidden";
});
})()
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment