angular / batarang

AngularJS WebInspector Extension for Chrome
MIT License
2.43k stars 338 forks source link

bug: hints break ui-router #186

Closed ayackel closed 9 years ago

ayackel commented 9 years ago

Can we have a way to disable hints? Angular-hint has some hard-coded directive types that are incompatible with ui-router. My app fails to load because ng-grid cannot find it's controller in the scope. With batarang disabled it is in the scope. I think this is due to the use of 'ui-view' instead of 'ng-view'.

 TypeError: Cannot set property 'gridDim' of undefined
    at ngGridDirectives.directive.ngGridDirective.compile.pre (http://localhost:9000/bower_components/ng-grid/build/ng-grid.js:2962:37)
    at invokeLinkFn (http://localhost:9000/bower_components/angular/angular.js:8194:9)
    at nodeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7685:11)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7062:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at compositeLinkFn (http://localhost:9000/bower_components/angular/angular.js:7065:13)
    at publicLinkFn (http://localhost:9000/bower_components/angular/angular.js:6941:30)
    at newCompile (chrome-extension://ighdmehidhipcmcojjgiloacoafjmpfk/dist/hint.js:2622:22)
    at compile (http://localhost:9000/bower_components/angular-ui-router/release/angular-ui-router.js:3905:9) <div class="gridStyle ng-scope" ng-grid="workTypeCtrl.gridOptions">
Splaktar commented 9 years ago

Looks like a duplicate of #159 and at least one other that I saw today.

shuhei commented 9 years ago

@Splaktar It's not only about disabling specific messages but about disabling angular-hint itself. The runtime error means that we can't use Batarang with apps built with ui-router.

btford commented 9 years ago

There are two separate issues here:

  1. ui-router is broken with batarang
  2. a feature request to disable certain parts of instrumentation

The first is more important to me. Can anyone please provide a reproduction via jsbin, plnkr.co, or jsfiddle that shows ui-router broken by the latest Batarang (v0.7.3)?

Splaktar commented 9 years ago

I just ran a number of tests with my app (which uses ui-router) and Batarang 0.7.4 enabled. I did not see any exceptions or other issues in the console or with the behavior of my app or routing.

We are using ui-view but we are not using ng-grid. So perhaps this is fixed or specific to ng-grid?

SomeKittens commented 9 years ago

Batarang works with UI-Router now.