Integration with angular.js does not work?


#1

Hi all,

As I am experimenting Ionic, I found an very strange error related to AngularJS in Ionic. I’ve tried to use ng-model in a field text, but this model is not bound to $scope. You can found an example code here: http://codepen.io/anon/pen/ezFDm . When I try to type the text and click on Search, the result is displayed as it did not receive change from text field.

I included js file from http://code.ionicframework.com/1.0.0-beta.1/js/ionic.bundle.min.js in which it is said that AngularJS is already included, so I supposed it had to work. But it did not actually.

Could you tell me how to get this example working?

Thank for your help,


#2

You need to do it like this:

See older post…


#3

Ah, it works. Thank @Alias for your help. I did see example at http://ionicframework.com/docs/guide/building.html in which they used something like ng-model=“task.title” but I didn’t think it was that important. May be some more explication on the docs might be more helpful.