Execute
<!DOCTYPE html> <html> <head> <title>Wikitechy AngularJS Tutorials</title> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.6/angular.min.js"> </script> <style> textarea.ng-invalid { background-color:yellow; } textarea.ng-valid { background-color:pink; } </style> </head> <body ng-app=""> <h3>textarea Directive in AngularJS Tutorial</h3> <p>Type any content inside the textarea</p> <textarea ng-model="myTextarea" required ></textarea> <p>The content of the textarea is:</p> <h1>{{myTextarea}}</h1> </body> </html>
www.wikitechy.com © Copyright 2016. All Rights Reserved.