Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.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
Javascript AngularJs 2选项卡自定义类条件_Javascript_Angularjs_Angular Ui Bootstrap_Ngx Bootstrap - Fatal编程技术网

Javascript AngularJs 2选项卡自定义类条件

Javascript AngularJs 2选项卡自定义类条件,javascript,angularjs,angular-ui-bootstrap,ngx-bootstrap,Javascript,Angularjs,Angular Ui Bootstrap,Ngx Bootstrap,我想有条件地为angular 2引导选项卡设置customClass,但只看到它是用静态值设置的 是否可以有条件地设置customClass? html: 这项工作: <tab index="1" customClass="myCustomClass"> 这是我想做的,但它不起作用: <tab index="1" customClass="myCustomClass: myConditionIsTrue"> 这应该行得通 <tab index="1"

我想有条件地为angular 2引导选项卡设置customClass,但只看到它是用静态值设置的

是否可以有条件地设置customClass?

html: 这项工作:

<tab index="1" customClass="myCustomClass">

这是我想做的,但它不起作用:

<tab index="1" customClass="myCustomClass: myConditionIsTrue">


这应该行得通

<tab index="1" [customClass]="condition ? 'myCustomClass1' : 'myCustomClass2'">