[Solved] [[object Object]] appear on textbox in angularjs [closed]


<form name="searchr">

This creates an object of type FormController, and stores it into the scope under the name searchr.

<input name="text">

This creates an object of type NgModelController and stores it in the FormController’s text attribute.

<input ng-model="searchr.text">

This tells angular that the model of the field (i.e. the text that must be displayed in the field) is searchr.text, but due to the above, searchr.textis the NgModelController object created by angular, which is part of the FormController object created by angular.

Don’t use the same name for the form as the name you use to store the model of the form.

1

solved [[object Object]] appear on textbox in angularjs [closed]