search

Home  >  Q&A  >  body text

angular.js - Angularjs How to write the select as fixed and submit it to the background based on the interface address?

1. How to submit the fixed value of value in option to the backend through the interface? Using ng-option, I can only write and retrieve the dictionary to pass the value to the background. If I fix the value, how should I write it? Please refer to it, thank you!


The above select is written in a dictionary. Please take a look. If the value below is written as fixed, how can it be passed to the background!

This js is also written in a dictionary. You can take a look. I need to write fixed values ​​and pass them to the background. Thank you!

巴扎黑巴扎黑2823 days ago541

reply all(2)I'll reply

  • 给我你的怀抱

    给我你的怀抱2017-05-15 17:09:31

    The value of the option you selected will be assigned to the ng-model of select

    After you finish selecting, console the value of ng-model, it will be the actionType you wrote above

    console.log($scope.actionType);

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-05-15 17:09:31

    I don’t quite understand what you mean

    ng-model绑定数据;
    ng-change="somefunction()";
    somefunction(
    $http...
    )

    reply
    0
  • Cancelreply