A
A
Aidar2016-06-10 11:27:57
css
Aidar, 2016-06-10 11:27:57

How to add values ​​of two selects in angular.js?

Do not scold too much, I took up angular, so to speak, in order to feel the benefits on a mini-task (as they say).
And so we have select. The data is stored in an array. When selected, the price for each item is immediately displayed.
But now you need to add more additional options to the product and sum up the price of a particular product with the price of additional options
. Product1 = 500 + additional option 200 and should output 700 as a result.
How to count elements of different selects?
Here is what I have thrown so far .... there is only one field and everything seems to be working. I ask because I do not want to reinvent the wheel or sculpt govnokod. What is the best way to organize all this?
Thanks in advance. My "creation" codepen.io/aderus/pen/zBrKBQ

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex, 2016-06-10
@Aderus

I understand you from JQuery to Angular come?
Here, data is handled a little differently.
codepen.io/Gopard/pen/QEyQKR

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question