Using ng-attr with tm1-date-option



I want to conditionally add the attribute tm1-date-option because it cannot be used together with tm1-multi-line:


The above code should only create the attribute if c.Date is defined.
But I get the error message:

libs.js?v=1.2.0:29341 Error: [$parse:syntax] Syntax Error: Token ‘{’ invalid key at column 2 of the expression [{{c.Date}}] starting at [{c.Date}}].


Hi Roland,

You should instead have two DBRs and use ng-if to enable/disable the appropriate one based on c.Date being defined.