mercredi 2 septembre 2015

Angular Mocks breaking my application

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.

Aucun commentaire:

Enregistrer un commentaire