Ng-Style

 
 
 
<!DOCTYPE html> <html lang="en-US"> <head> <title>Welcome in the Angular JS</title> <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.0-rc.1/angular.min.js"></script> </head> <body ng-app> <div> <button ng-click="msgStyle={'color':'#5cb85c'}">Success Message</button> <button ng-click="msgStyle={'color':'#d9534f'}">Danger Message</button> <button ng-click="msgStyle={'color':'#5bc0de'}">Info Message</button> <button ng-click="msgStyle={'color':'#f0ad4e'}">Warning Message</button> <h1 ng-style="msgStyle">Hi! Reagan.</h1> </div> </body> </html>
Output