上下文RadioGroup中不支持Angular2 - 模板解析錯誤
我有一個Angular2應用爲其輔助功能是很重要的。我使用的輔助功能評估程序在抱怨收音機輸入具有相同的名稱,但未包含在radiogroup
元素中。但是,當我把radiogroup
元素,Angular2給模板解析錯誤:
Unhandled Promise rejection: Template parse errors:
'radiogroup' is not a known element:
1. If 'radiogroup' is an Angular component, then verify that it is part of this module.
2. If 'radiogroup' is a Web Component then add "CUSTOM_ELEMENTS_SCHEMA" to the '@NgModule.schemas' of this component to suppress this message. ("
<div>
[ERROR ->]<radiogroup>
<input type="radio" name="foo id="true" label="True" value="true" />
<in"): [email protected]:6 ; Zone: <root> ; Task: Promise.then ; Value: Error:
import { Component } from '@angular/core';
@Component({
selector: 'my-component',
template: `
<radiogroup>
<input type="radio" name="my-radio" value="true" />True
<input type="radio" name="my-radio" value="false" />False
</radiogroup>
`
})
export class MyComponent {};
我已經導入FormsModule
到模塊的代碼。
請爲angular2 https://www.npmjs.com/package/ng2-radio-group找到一個收音機組模塊。 –