11import {
22 Component ,
3+ ElementRef ,
34 HostBinding ,
5+ HostListener ,
46 Input ,
5- ViewChild ,
6- ElementRef ,
77 OnInit ,
8+ TemplateRef ,
9+ ViewChild ,
810 ViewEncapsulation ,
9- HostListener ,
10- TemplateRef , forwardRef ,
11+ forwardRef ,
1112} from '@angular/core' ;
1213import { DomSanitizer , SafeStyle } from '@angular/platform-browser' ;
1314import {
@@ -16,8 +17,7 @@ import {
1617 MdError ,
1718 coerceBooleanProperty
1819} from '../core' ;
19- import { MdTextareaAutosize } from './autosize' ;
20- import { MD_PLACEHOLDER_HOST_TOKEN , MdPlaceholderHost } from './placeholder' ;
20+ import { MD_PLACEHOLDER_HOST , MdPlaceholderHost } from './placeholder' ;
2121import { PortalHost } from '../core/portal/portal' ;
2222import { PortalHostDirective } from '../core/portal/portal-directives' ;
2323
@@ -47,7 +47,7 @@ const MD_INPUT_INVALID_INPUT_TYPE = [
4747 styleUrls : [ 'input.css' ] ,
4848 encapsulation : ViewEncapsulation . None ,
4949 providers : [
50- { provide : MD_PLACEHOLDER_HOST_TOKEN , useExisting : forwardRef ( ( ) => MdInput ) }
50+ { provide : MD_PLACEHOLDER_HOST , useExisting : forwardRef ( ( ) => MdInput ) }
5151 ] ,
5252 host : {
5353 // This is to remove the properties of the `input md-input` itself. We still want to use them
@@ -70,7 +70,7 @@ export class MdInput implements OnInit, MdPlaceholderHost {
7070 get _safeCssStyle ( ) : SafeStyle {
7171 return this . _dom . bypassSecurityTrustStyle ( this . _cssStyle || '' ) ;
7272 }
73- @HostBinding ( 'attr.class' ) get _attrClass ( ) : any { return null ; }
73+ @HostBinding ( 'attr.class' ) get _attrClass ( ) : any { return 'md-input-element' ; }
7474 @HostBinding ( 'attr.style' ) get _attrStyle ( ) : any { return null ; }
7575
7676 @Input ( 'type' ) _type : string ;
@@ -138,18 +138,3 @@ export class MdInput implements OnInit, MdPlaceholderHost {
138138 this . _ref . nativeElement . focus ( ) ;
139139 }
140140}
141-
142-
143- @NgModule ( {
144- declarations : [ MdPlaceholder , MdInput , MdHint , MdTextareaAutosize ] ,
145- imports : [ CommonModule , FormsModule ] ,
146- exports : [ MdPlaceholder , MdInput , MdHint , MdTextareaAutosize ] ,
147- } )
148- export class MdInputModule {
149- static forRoot ( ) : ModuleWithProviders {
150- return {
151- ngModule : MdInputModule ,
152- providers : [ ]
153- } ;
154- }
155- }
0 commit comments