3 ms·
I don't know Angular at all. But it appears that the example with $scope is not respecting the MVC design pattern. It's all been flattened and merged. The contr
by logn 12y ago
I don't know Angular at all. But it appears that the example with $scope is not respecting the MVC design pattern. It's all been flattened and merged. The controller should only update the model. And the view should only get state from the model. In the example, the controller wraps the model and presents itself to the view as the model and controller. So now to write a test of the view, you can't just create some dummy model, you have to create a mocked up controller.