R
R
Roman Ogarkov2016-06-14 12:40:02
JavaScript
Roman Ogarkov, 2016-06-14 12:40:02

How to play around with an expression in an angular template?

You need to get a binding to the generated model. Here are the types

.widget.pop-up .line.text#text{{::count}} {
    color:          {{textElements["text1"].color}};
    font-family:    {{textElements["text1"].fontFamily}};
    font-size:      {{textElements["text1"].fontSize}}px;
    padding-bottom: {{textElements["text1"].paddingBottom}}px;
    text-align:     {{textElements["text1"].textAlign}};
  }
  .widget.pop-up .line.text#text{{::count}} {
    color:          {{textElements["text2"].color}};
    font-family:    {{textElements["text2"].fontFamily}};
    font-size:      {{textElements["text2"].fontSize}}px;
    padding-bottom: {{textElements["text2"].paddingBottom}}px;
    text-align:     {{textElements["text2"].textAlign}};
  }

and so on ad infinitum.
How to make a link of this type?
color:          {{textElements["text"::count].color}};

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-06-14
Protko @Fesor

Such things are easier to do in JS. We take out this goodness in a separate directive and simply collect it in the template function.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question