How to debug type conversion errors in AngularJS?

I am new to javascript and trying to learn angular.

I have a simple simple corner code:

<div ng-controller="todoController">
    <span> temp = {{tempVal()}} </span>
</div>

the error is quite simple , tempVal is a string, not a method.

My problem (and question) is, how do I detect this fact when debugging?

I use Chrome and install the Batarang extension, but all I get is a critical stack trace:

TypeError: string is not a function
at http://localhost:6202/lib/angular-1.0.4/angular.js:6213:13
at Object.$interpolate.fn (http://localhost:6202/lib/angular-1.0.4/angular.js:4829:22)
at Object.watchExpression (http://localhost:6202/AddSomeControl/index.html:416:29)
at Object.Scope.$digest (http://localhost:6202/lib/angular-1.0.4/angular.js:7783:38)
at Object.Scope.$apply (http://localhost:6202/lib/angular-1.0.4/angular.js:7991:24)
at Object.$delegate.__proto__.$apply (http://localhost:6202/AddSomeControl/index.html:500:30)
at http://localhost:6202/lib/angular-1.0.4/angular.js:932:13
at Object.invoke (http://localhost:6202/lib/angular-1.0.4/angular.js:2813:25)
at bootstrap (http://localhost:6202/lib/angular-1.0.4/angular.js:930:12)
at angularInit (http://localhost:6202/lib/angular-1.0.4/angular.js:906:5) angular.js:5601

I'm getting stuck trying to figure out how with these tools in a complex application I could find that the error is somewhere around this line tempVal () .

, , , $get.Scope. $digest, , (this.target. $id), , "" (this.length), , html (this.value).... ? : (

+5
1

, , , .

, , " angular /vm "

.

+5

All Articles