S
S
Sergey2015-12-03 11:13:42
JavaScript
Sergey, 2015-12-03 11:13:42

Apply filter in ngClass?

Is it possible to pass the following logic to ngClass:
If the line variable is true, then display the css class mt20, if not, then do nothing
Example
ng-class="mt20|line"
Where mt20 is a css class (not an angular variable), and line is boolian variable angular

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Protko, 2015-12-03
@Sergamers

<div ng-class="{mg20: line}">
read the documentation for your tools.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question