Search code examples
angularjsmeteorangular-meteor

AngularJS Meteor $controller won't take binding argument -- angular version issue


I am trying to write a test that has a before hook like so:

beforeEach(()=>{
  inject(function ($rootScope) {
    scope = $rootScope.$new(true);
    controller = $controller('userDetailsCtrl', {$scope: scope}, {locals: {userId: testUserId}});
});}

But I get a message that compileProvider.preAssignBindingsEnabled is not a function I believe this is because angular-meteor is using AngularJS 1.5.3. Is there a work around for this or a way to force it to use a newer version of angular?


Solution

  • So I figured out that I can get it to work if I downgrade angular-mocks to 1.5.5 Does anyone know how to get it to work on later versions?