Get text from text field in modal example


I have problems getting the value of text field from the example modal.
Following the example i have ng-model=“textField” in the HTML. And in app.js. The controller i put in the top div in the modal . When click on the button it triggers the function , because the model.hide() works, but obviously doesn’t get textField value.


You need to use “dot notation”.

$ = '';

Then in you modal :

<input type="text" ng-model="data.textField" />