title: Getting angular directive attribute value returns 'undefined'
body: <p>I'm doing a directive for input mask. But, when I pass a string as value the attribute is undefined. If I pass directly the mask It's working.</p>
  
  <pre><code>.directive('inputMask', function () {
  return {
      restrict: 'EAC',
      scope: true,
      link: function (scope, element, attrs) {
          scope.$watch('inputMask', function (newVal) {
              console.log('inputMask', newVal);
          });
          var maskType = scope.$eval(attrs.inputMask);
          switch (maskType) {
              case 'phone':
                  $(element).inputmask("phone", {
                      url: '@Url.Content("~/Scripts/jquery-inputmask/phone-codes/phone-codes.json")',
                      onKeyValidation: function () { //show some metadata in the console
                          console.log($(this).inputmask("getmetadata")["name_en"]);
                      }
                  });
                  break;
              case 'money':
                  $(element).inputmask("decimal", { digits: 2 });
                  break;
              case 'moneyGrouped':
                  $(element).inputmask("decimal", {
                      radixPoint: ",",
                      autoGroup: true,
                      groupSeparator: ".",
                      groupSize: 3,
                      digits: 2
                  });
                  break;
              case 'email':
                  $(element).inputmask('Regex', { regex: "[a-zA-Z0-9._%-]+@[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}" });
              default:
                  $(element).inputmask(maskType);
          }
  
          $(element).inputmask(scope.$eval(attrs.inputMask));
          $(element).on('keypress', function () {
              scope.$eval(attrs.ngModel + "='" + element.val() + "'");
          });
      }
  };
  });
  </code></pre>
  
  <p>Working (will get into default of the switch):</p>
  
  <pre><code>&lt;input type="teste" name="teste" value="" ng-model="form.email" input-mask='{ "mask": "d/m/y", "autoUnmask" : true}'/&gt;
  </code></pre>
  
  <p>Not working, <strong>attrs.inputMask</strong> is <code>undefined</code> (should enter in case 'money'):</p>
  
  <pre><code>&lt;input type="teste" name="teste" value="" ng-model="form.email" input-mask='money'/&gt;
  </code></pre>
  
  <p>What is wrong?</p>