Friday, 15 June 2012

javascript - How do i get the selected value in select dropdown of x-editable angularjs -


I am using x-editable in angularjs.

When I submit the selection.

I did not get a new price with the data given in the document

Here's the

script:

  var app = Angular Module ("app", ["adbabel", "ngmk 2 a"]); App.run (function (editable options) {editableOptions.theme = 'bs3';}); App.controller ('ctrl', function ($ scope, $ q, $ http) {$ scope.items = ['a', 'b', 'c']; $ scope.user = {id: 1, name : 'A'}; $ scope.updateUser = function (data) {warning (data); $ scope.console = data; $ http.post ('/ updateUser', {ID: $ scope.user.id, name return ) : Information}); }; }); // duplicate `/ updateUser` request app.run (function ($ httpBackend) {$ httpBackend.whenPOST (/ \ / updateUser /.) Response (function (method, url, data) {data = angular.fromJson (data); If (data.name === 'error') {returns [500, 'error message'];} {return {200, {condition: 'ok}}}}});});  

Can anyone help me, how do I get updated prices?

Your problem is that you are trying to read s.text in your html, but your Do not have any text key in your array!

Change <....

  ng-options = "s.text in the item for"  

to <

And it seems to work.


No comments:

Post a Comment