Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 角度6.1秒@未识别输入_Angular_Input - Fatal编程技术网

Angular 角度6.1秒@未识别输入

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

当我只使用1@Input(参见下面的ElementType)时,一切都很好。 但是,当我添加第二个@Input(验证提示)时,第一个输入被识别,但第二个输入不被识别

@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>