angular-material-simple-components
Version:
This include simplification of angular material components
26 lines (21 loc) • 1.23 kB
HTML
<ng-form name="_form" ng-cloak>
<md-input-container flex class="md-block md-icon-left" md-is-error="$component.invalid && ($component.touched || $component.dirty)" md-no-float="$component.noFloat">
<md-icon class="material-icons" ng-if="$component.icon">{{ $component.icon }}</md-icon>
<md-icon class="material-icons" ng-if="!$component.icon" md-svg-src="{{ $component.fallbackIcon }}"></md-icon>
<input
type="time"
placeholder="{{$component.label}}"
name="{{ $component.name }}"
id="{{ $component.name }}"
ng-model="$component.value"
ng-change="$component.onChange()"
ng-model-options="$component.modelOptions"
ng-required="$component.isRequired"
ng-disabled="$component.isDisabled"
ng-focus="$component.isDisabled || $component.setTouched()"
ng-click="$component.isDisabled || $component.setTouched()" >
<div ng-messages="$component.errors" ng-show="$component.dirty || $component.touched" >
<ng-transclude></ng-transclude>
</div>
</md-input-container>
</ng-form>