all files / app/main/components/material-docs/demo-partials/select/demoValidations/ script.js

10% Statements 1/10
0% Branches 0/2
0% Functions 0/3
10% Lines 1/10
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17                                
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!');
    }
  };
});