Material2:扩展MatInput

时间:2017-11-08 02:20:10

标签: angular typescript angular-material2

我正在尝试让Material 2的public function initialize() { $this->view->disable(); $this->s3 = Aws::factory(CommonLibrary.'awsConfig.php')->get('s3')->registerStreamWrapper(); $this->aws = Aws::factory(CommonLibrary.'awsConfig.php'); $this->prefix='folder/'; //i dont why this prefix is for. $this->bucket="bucketname"; //my bucketname // Get the client from the builder by namespace $this->client = $this->aws->get('S3'); 听取服务。当然,我不能那样做,所以我想我可以扩展它。但无论我做什么,Angular告诉我:

  

错误:mat-form-field必须包含MatFormFieldControl。你是否   忘记将matInput添加到本机输入或textarea元素?

我一直在添加原始MatInput的部分内容。这就是我现在拥有的东西?我会走错了兔子洞吗?

MatInput

1 个答案:

答案 0 :(得分:1)

添加以下@Directive装饰器:

providers: [{provide: MatFormFieldControl, useExisting: ResponsiveInputComponent}]