V
V
Vladislav Yandimirkin2016-09-12 10:48:41
Angular
Vladislav Yandimirkin, 2016-09-12 10:48:41

Is it possible to use as in temlate?

Now you have to bind the values ​​​​of the variables like this

{{client.building.somePar}}
   {{client.building.somePar2}}

<div bind="client.building as building">
   {{building.somePar}}
   {{building.somePar2}}
</div>

Is there such a thing in the first angular or not?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2016-09-12
@vlaad360

there is ng-init but I think you need something else. I usually do these aliases at the component controller level. Well, in general, your desire is more like that you have a piece of the template, which would be more profitable to separate into a separate component.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question