Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[$injector:strictdi] function($parse) is not using explicit annotation and cannot be invoked in strict mode #293

Open
samueltrevena opened this issue May 13, 2018 · 1 comment

Comments

@samueltrevena
Copy link

I'm running AngularJS 1.6.10 with Webpack 4.6.0. In my main app-file I'm loading angular-tree-control thus:

  • require('../../node_modules/angular-tree-control/context-menu.js');
  • require('angular-tree-control');

(Due to #285, the context-menu.js require was added).

I've also configured my app to run in strict-di mode (ng-strict-di / 'use strict';)

However, strict-di mode mode causes a $injector:strictdi error for angular-tree-control. This is due to $parse not beeing explicitly annotated in the angular-tree-control directive treeRightClick. Although, it is explicitly annotated in the setNodeToData directive.

Correct:
.directive("setNodeToData", ['$parse', function($parse) {

Incorrect:
.directive('treeRightClick', function($parse) {
---> should be:
.directive('treeRightClick', ['$parse', function($parse) {

@meet-asite
Copy link
Contributor

I have raised a PR: #297

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants