[AngularJS] - Bai 13 - 2
RUN
<!doctype html> <html lang="vi"> <head> <meta charset="UTF-8"> <title>Ví dụ sử dụng Directive ng-Form</title> <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.2/angular.min.js"></script> <script> angular.module('myapp', []) .controller('DateController', ['$scope', function($scope) { $scope.value = new Date(); }]); </script> </head> <body ng-app="myapp"> <form name="myForm" ng-controller="DateController"> <input type="date" name="input" ng-model="value" min="2014-01-01" max="2014-12-31" required /> <br/><br/> <tt>value = {{value}}</tt><br/> </form> </body> </html>
PHÓNG TO