I want to test my form in angular, just like this solution from here. But in my case, I'm using controllerAs
(I'm using controller without $scope to reference controller methods) syntax for my controller.
How can I accomplish that?
I want to test my form in angular, just like this solution from here. But in my case, I'm using controllerAs
(I'm using controller without $scope to reference controller methods) syntax for my controller.
How can I accomplish that?
It will still work exactly the same. The only difference is that you don't need to pass the scope into the construction of the controller but Angular will still bind the form objects to the scope and they can be accessed in the tests exactly the same way.