angular-material-npfixed
Version:
The Angular Material project is an implementation of Material Design in Angular.js. This project provides a set of reusable, well-tested, and accessible Material Design UI components. Angular Material is supported internally at Google by the Angular.js, M
17 lines (16 loc) • 445 B
JavaScript
angular.module('selectDemoValidation', ['ngMaterial', 'ngMessages'])
.controller('AppCtrl', function($scope) {
$scope.clearValue = function() {
$scope.quest = undefined;
$scope.favoriteColor = undefined;
$scope.myForm.$setPristine();
};
$scope.save = function() {
if ($scope.myForm.$valid) {
$scope.myForm.$setSubmitted();
alert('Form was valid.');
} else {
alert('Form was invalid!');
}
};
});