jaswant
jaswant

Reputation: 1

Angular js get val() from ng-modal

I have this code in my project

var $reason = this.$el.find('select.reason');

if i will do this $reason.val();

I will get this output:

0:select.form-control.reason
context:undefined
length:1
selector:"select.reason"

How i can achieve this in angular js using modal value? or something else

Upvotes: 0

Views: 113

Answers (1)

quirimmo
quirimmo

Reputation: 9998

For having the HTML element just access the [0]. You can simply use:

console.log($reason[0]);

Upvotes: 1

Related Questions