Pritbh Pritbh - 8 months ago 18
AngularJS Question

Angular bad augmentation error

I keep getting error when i change scr code file of angular in src link from 1.2.2 to 1.5.0 i.e. code works prefectly fine with 1.2.2 but i get this error if I change it to 1.5.0 . I want to update it to 1.5.0 what can I do I mean what updates in the code needs to be done to make it compatible with angular 1.5.0

Error: ng:areq
Bad Argument
Argument 'Controller_index' is not a function, got undefined
AngularJS often asserts that certain values will be present and truthy using a helper function. If the assertion fails, this error is thrown. To fix this problem, make sure that the value the assertion expects is defined and truthy. I know 1.2.2 is outdated but I am using the same thing and I don't know whats new in 1.5.0 and how to change it.As per my knowledge it looks fine to me.

Lex Lex

That error means you have not registered Controller_index as a controller. Try adding:

module.controller('Controller_index', Controller_index);

This was a breaking change between 1.2 and 1.3.