Home
Run >
<html> <head> <title>My first AngularJS ng-class Directive code</title> <Script SRC="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.13/angular.js"> </Script> <Script> //Defining Controller Using Standard Javascrip Object Constructor function CustomerController($scope) { $scope.siteName = "www.techstrikers.com"; $scope.clicked = function() { $scope.siteCSS = "{font-family:Cambria;font-size:20px;}"; }; } </Script> </head> <body> <div ng-app=""> <div ng-controller="CustomerController"> <input id="btnButton" type="button" value="Change Font" ng-change="clicked">
{{ siteName }}
</div> </div> </body> </html>