Created
December 14, 2013 14:40
-
-
Save anonymous/7959969 to your computer and use it in GitHub Desktop.
Revisions
-
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ AngularJS NgClass Example ------------------------- /* ---AngularJS NgCLass Example--- For More Examples AngularJS http://mehmetcanker.com A [Pen](http://codepen.io/mehmetcanker/pen/soHik) by [mehmetcanker](http://codepen.io/mehmetcanker) on [CodePen](http://codepen.io/). [License](http://codepen.io/mehmetcanker/pen/soHik/license). This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ <html ng-app="mehmetCanker"> <head> <link href="//cdn.jsdelivr.net/foundation/5.0.2/css/foundation.css" rel="stylesheet" type="text/css"> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script> </script> </head> <body> <div ng-controller="ngClassExample" > <button ng-model="classBool" ng-init="classBool=false" ng-click="changeCss()">{{stat}}</button> <div ng-class="{panel:classBool}">Foundation Panel Block</div> </div> </body> </html> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,31 @@ //More info htpp://mehmetcanker.com //Module Defining //Module Tanimlaniyor. var myApp = angular.module('mehmetCanker', []); //Creating Controller in mehmetCanker module //Olusturulan module icine controller //tanimladik myApp.controller('ngClassExample', ['$scope', function($scope){ //initial Value for Toggle Button Value $scope.stat = "Show"; //changeCss Function $scope.changeCss = function(){ $scope.classBool = !$scope.classBool; //Toggle Button Value is changed by classBool if($scope.classBool){ $scope.stat = "Hide"; }else{ $scope.stat = "Show"; } } }]);