AngularJS TypeError: object is not a function

AngularJS TypeError: object is not a function

The error msg in Chrome Dev Tools. “TypeError: object is not a function”

Update: I found out the problem! Woohoo… see below.

Image

Error happens when I click the submit button on a form. It doesn’t even get to the controller function so I’m thinking it’s an internal error to Angular 1.2.9 somewhere.

The error in Firefox: “Error: fnPtr is not a function”

Image

On further inspection, it seems it’s this code.

Image

Now this looks like some IE fix (obviously) so why the hell is it breaking???

Notes:
I’m using Lineman Angular Template so maybe it’s calling $q.all somewhere and causing the issue to the surface? Either way, it’s stopping my form from working….

Upgrades:
I’ve tried upgrading to Angular 1.2.15 and I get the same error.
And unstable version 1.3.0-beta.4 same result.

Cause:

For some reason it doesn’t like the “name” property on the form… why? Maybe Angular can’t handle the name on the form when it’s binding or something.

But when you remove that it works fine.

Now the login() function in the controller is being called as normal.

Image

Conclusion:

So these are the AngularJS TypeError: object is not a function.If you like this tutorial script then share it with your community. If you have any suggestion Feel free to comment below.If you want to learn more about PHPCodeIgniterAngularJSLaraveljQuery  Web Development then daily visit PHPCodify. Sharing is Caring.

AngularJS TypeError: object is not a function

Read previous post:
PHP Date And Time
PHP Date And Time

PHP Date And Time PHP Date and Time is used to get and format the date and time with there...

Close