You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
The problem is using the fat arrow syntax to define the function constructor for the controller class. Assuming your function passed as the second argument to module.controller is Foo, Angular will call new Foo(...) on it, which is illegal with the fat arrow syntax in ES6.
@wesleycho, is right. Controllers should be instantiable (i.e. called with new), so things like arrow functions (() => {...}) and shorthand object methods ({someMethod() {...}}) aren't suitable for controllers.
Im trying to learn angular-tdd
with this versions my tests is working fine
depencies version
angular: 1.4.8
angular-mocks: 1.4.8
node: v4.4.5
karma-cli: 0.13.22
but when i use
versions
"angular": "^1.5.7"
"angular-mocks": "^1.5.7"
it throws an error
The text was updated successfully, but these errors were encountered: