AngularJS ng-show -
i want show , hide div ng-show directive.
here html file:
<body ng-app="my-app"> <div ng-controller="maincontroller"> <ul ng-show="isvisible" id="context-menu"> <li> menu item 1 </li> <li> menu item 2 </li> </ul> </div> </body>
here coffeescript file:
myapp = angular.module("myapp", []) myapp.controller "maincontroller", ["$scope", ($scope) -> $scope.isvisible = false ]
here codepen it.
what problem? can help?
the issue code :
<body ng-app="my-app">
it should be:
<body ng-app="myapp">
don't confuse how define attributes values.
Comments
Post a Comment