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中输入元素的占位符样式?_Angular - Fatal编程技术网

如何绑定到angular中输入元素的占位符样式?

如何绑定到angular中输入元素的占位符样式?,angular,Angular,我怎样才能在这方面取得成功 [style.placeholder.color]="active ? 'white' : 'grey'" 请参见绑定输入元素的占位符伪元素。如何绑定到输入元素占位符的样式属性 <input type="text" (click)="active = !active" [placeholder]="'hello'" [style.placeholder.color]="a

我怎样才能在这方面取得成功

[style.placeholder.color]="active ? 'white' : 'grey'"
请参见绑定输入元素的占位符伪元素。如何绑定到输入元素占位符的样式属性

<input type="text" (click)="active = !active" [placeholder]="'hello'" [style.placeholder.color]="active ? 'white' : 'grey'">


是的。您可以使用@ViewChild(#ref),然后使用Render2自定义元素。

是的。您可以使用@ViewChild(#ref),然后使用render2自定义元素。

我认为这是不可能的。让我想想……我觉得这根本不可能。让我们看看;这是一点工作。没有viewchild我如何实现它?我的意思是在模板内!那个这是一点工作。没有viewchild我如何实现它?我的意思是在模板内!