Reputation: 891
I want to use angular-mocks.js
in my application. I have the script dependency referenced in the <head>
and want to include it as a dependency for my module:
angular.module('myapp', ['ngMock']);
Before adding ngMock
to my module, all of the AngularJS works fine. When I include it, all of my Angular code breaks, or at least nothing generated with Angular is being displayed on the page. For example, all I see are the expressions:
{{elementKey}} - {{elementValue}}
in my HTML, instead of the actual evaluated expressions.
No errors are being thrown in the console, so I don't know what's going wrong. I just want to include it for unit testing purposes.
EDIT: I am using version 1.4.3 of angular and angular-mocks.
Upvotes: 0
Views: 153
Reputation: 891
Credit to @sma
Don't add the ngMock
module to the application itself. Instead, just include it in the unit tests.
Upvotes: 2