小编Rus*_*312的帖子

以角度2重置输入值

我输入输入字段如下:

<input mdInput placeholder="Name" #filterName name="filterName" >
Run Code Online (Sandbox Code Playgroud)

我想清除点击清除按钮的价值:

<button (click)="clearFilters()">Clear</button>
Run Code Online (Sandbox Code Playgroud)

请告诉我上面的错误,因为它不适合我.

这里的jsfiddle https://jsfiddle.net/8fw8uq3x/

angular

16
推荐指数
3
解决办法
6万
查看次数

使用Angular材质获取类型错误

我是Angular的新手并安装了角度材料.我已经尝试过datepicker,它向我显示了这个错误:

MdInputContainer.html:1 ERROR TypeError: this.engine.setProperty is not a function
    at AnimationRenderer.webpackJsonp.../../../platform-browser/@angular/platform-browser/animations.es5.js.AnimationRenderer.setProperty (animations.es5.js:502)
    at DebugRenderer2.webpackJsonp.../../../core/@angular/core.es5.js.DebugRenderer2.setProperty (core.es5.js:13781)
    at setElementProperty (core.es5.js:9443)
    at checkAndUpdateElementValue (core.es5.js:9362)
    at checkAndUpdateElementInline (core.es5.js:9296)
    at checkAndUpdateNodeInline (core.es5.js:12375)
    at checkAndUpdateNode (core.es5.js:12321)
    at debugCheckAndUpdateNode (core.es5.js:13182)
    at debugCheckRenderNodeFn (core.es5.js:13161)
    at Object.eval [as updateRenderer] (MdInputContainer.html:1)
Run Code Online (Sandbox Code Playgroud)

app.module.ts

import { BrowserModule } from '@angular/platform-browser';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import {AppRoutingModule} from './app-routing.module';
import { NavigationComponent } from …
Run Code Online (Sandbox Code Playgroud)

angular-material2 angular

9
推荐指数
1
解决办法
4725
查看次数

标签 统计

angular ×2

angular-material2 ×1