gpt4 book ai didi

html - 模板解析错误

转载 作者:行者123 更新时间:2023-11-28 02:38:24 24 4
gpt4 key购买 nike

我已经导入了所有必需的模块,但仍然遇到此错误。

Template parse errors:
Can't bind to 'ngModel' since it isn't a known property of 'md-select'.
1. If 'md-select' is an Angular component and it has 'ngModel' input, then
verify that it is part of this module.
2. If 'md-select' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to
the '@NgModule.schemas' of this component to suppress this message.
3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas'
of this component.

最佳答案

检查是否包含了BrowserModule,MaterialModule,FormsModule

import {FormsModule} from '@angular/forms';
@NgModule({
imports: [
BrowserModule,
MaterialModule.forRoot(),
FormsModule
],
declarations: [AppComponent],
entryComponents: [AppComponent],
})

关于html - 模板解析错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45755132/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com