Angular 角度6.1秒@未识别输入
当我只使用1@Input(参见下面的ElementType)时,一切都很好。 但是,当我添加第二个@Input(验证提示)时,第一个输入被识别,但第二个输入不被识别Angular 角度6.1秒@未识别输入,angular,input,Angular,Input,当我只使用1@Input(参见下面的ElementType)时,一切都很好。 但是,当我添加第二个@Input(验证提示)时,第一个输入被识别,但第二个输入不被识别 @Component({ selector: 'sh-workspace-header', templateUrl: './workspace-header.component.html', styleUrls: ['./workspace-header.component.scss'] }) export class
@Component({
selector: 'sh-workspace-header',
templateUrl: './workspace-header.component.html',
styleUrls: ['./workspace-header.component.scss']
})
export class WorkspaceHeaderComponent implements OnInit {
@Input() ElementType: string;
@Input() ValidationHint: string; <- Not recognized
@Output() HeaderEvent = new EventEmitter<WorkspaceHeaderEvent>();
@组件({
选择器:“sh工作区标头”,
templateUrl:'./workspace header.component.html',
样式URL:['./工作区标题.component.scss']
})
导出类WorkspaceHeaderComponent实现OnInit{
@Input()元素类型:string;
@Input()ValidationHint:string;如果要传递字符串。可以通过删除方括号来传递普通属性而不是属性绑定
<sh-workspace-header ElementType="'Project'" ValidationHint="'none'" (HeaderEvent)="catchHeaderEvent($event)" >
</sh-workspace-header>
是否保存了WorkspaceHeaderComponent文件?能否在stackblitz上重新创建此文件?是否在任何模块中添加了此组件?
<sh-workspace-header ElementType="'Project'" ValidationHint="'none'" (HeaderEvent)="catchHeaderEvent($event)" >
</sh-workspace-header>