<form novalidate> <h4>Inside a form</h4> <md-input-container> <input mdInput name="example" placeholder="example" [(ngModel)]="errorMessageExample3" required> <md-error>This field is required</md-error> </md-input-container> <button color="primary" md-raised-button>Submit</button> </form>
不幸的是,当我尝试做同样的事情时,我得到:
Unhandled Promise rejection: Template parse errors: 'md-error' is not a known element: 1. If 'md-error' is an Angular component,then verify that it is part of this module. 2. If 'md-error' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
我该怎么做才能使用< md-error>?