GithubHelp home page GithubHelp logo

Simpler ngModel bind... about ui-select HOT 6 CLOSED

angular-ui avatar angular-ui commented on May 28, 2024
Simpler ngModel bind...

from ui-select.

Comments (6)

brunomacf avatar brunomacf commented on May 28, 2024

PS.: This question is related with a simpler method to set the initial value of the ui-select (set programmatically)!

from ui-select.

andrewboni avatar andrewboni commented on May 28, 2024

Yes, I would also like a way to do this.

I just want to bind one value from a key:value pair to the model, instead of the entire object.

from ui-select.

tkrotoff avatar tkrotoff commented on May 28, 2024

@brunomacf Not sure to understand, can you provide a code snippet or point to a Select2/Selectize example?

from ui-select.

j-walker23 avatar j-walker23 commented on May 28, 2024

I think they just mean the default, example from select2 homepage. Sorry if this is not what they meant. Pass value and display property. Calling $('#e8).select2('val') = AK. I think thats what they meant by simple key:value.

  <select id="e8" style="width:300px" class="populate select2-offscreen" tabindex="-1" title="">

     <option value="AK">Alaska</option>
     <option value="HI">Hawaii</option>

  </select>  

They want to build the options out dynamically like ui-select already does using objects, but the ng-model in <ui-select ng-model="my.model"> would equal AK instead of {id: "AK", name: "Alaska"}

from ui-select.

dimirc avatar dimirc commented on May 28, 2024

@brunomacf let's keep discussion at #68 that seams like the same situation. A solution should be ready soon

from ui-select.

dimirc avatar dimirc commented on May 28, 2024

@brunomacf Take a look at PR #107 that I just created. All comments and suggestions are welcome.

from ui-select.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.