Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • The problem is, how can I set my own value to the options here? I need financial.id as value and financial.financial_year as option text.Your suggestion will make values like 0,1,etc.. Commented Jan 28, 2014 at 12:30
  • @devo: You don't need to render your value into the options and should not care about that. When you work with angular, you should access all of this in your scope. For example: it's easy to access the id from your account_year array and your selectedFinancial. That's how Model and View separation comes into play. Commented Jan 28, 2014 at 12:33
  • I am using one object newItem to set my all form values and passing only that object to my form submit to use in ajax like this, ReceiptVoucher.save(data, function (response) { }, function (error) { // error }); Here the data is the passes newItem object. Commented Jan 28, 2014 at 12:40
  • @devo: You can just extract the id from selectedFinancial and construct the data you need to send. You want to bind to id field and just send it without extracting ? Commented Jan 28, 2014 at 12:51
  • Yes, I don't want to extract it from my js. Commented Jan 28, 2014 at 12:54