ui-select - How to put "name" attribute

Asked

Viewed 140 times

1

Little problem here for a change, someone already worked with ui-select, I’m using in a project here within a client registration form to select states and cities, this working beauty, but it does not accept the attribute "name" and nor "requered" so I can pick up later when submitting the form.

This is the example of using this module: http://plnkr.co/edit/a3KlK8dKH3wwiiksDSn2?p=preview

1 answer

1

About the value you can catch it by ng-model when submitting. Now as for the required if it really doesn’t understand I would indicate to you to create a validation directive

  • I created a Hidden input that received the value of that select by ng-model, it worked, but it turned into an ugly gambit. In the end I used select 2 via jquery, because I was already without patience and time. I need to study how to create directives that I don’t know yet because I haven’t needed them. Thanks for the @Caiquegtr reply .

Browser other questions tagged

You are not signed in. Login or sign up in order to post.