Shows no models etc. #52

prashantjain68 opened this Issue Feb 12, 2013 · 14 comments


None yet
10 participants

Screen shot 2013-02-12 at 3 18 12 PM

I downloaded the Batarang extension and tried it in both Chrome and Chrome Canaray. But it doesn't seem to show me any Angular related data.

What am I doing wrong?

kwerle commented Feb 13, 2013

Same thing.
Chrome Version 24.0.1312.57
angular 1.0.4

Chrome Version 24.0.1312.57
angular 1.1.2-74dd2f79

Likewise, but only for local files. It works fine on e.g.

Version 27.0.1423.0 dev
Extension 0.3.4 with local file access enabled

It looks like this works when using the ng-app directive, but not when manually bootstrapping. As an experimental workaround, I removed the content_scripts section from the extension manifest, copied js/inject/debug.js into my project, and called its inject() function directly, before bootstrapping, instead of attaching it to the DOMContentLoaded event. That worked, so hopefully it's helpful in figuring out a real fix.

tmc commented Mar 19, 2013

For what it's worth it doesn't appear to work for me offline even with the ng-app directive. Here's the traceback:

[46290:519:0319/095236:ERROR:CONSOLE(5526)] "TypeError: Cannot read property 'id' of undefined
    at Object.ModelCtrl.$scope.inspect (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/controllers/ModelCtrl.js:5:32)
    at chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:6129:19
    at chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:12496:13
    at Object.Scope.$eval (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:7770:28)
    at Object.Scope.$apply (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:7850:23)
    at HTMLAnchorElement.<anonymous> (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:12495:17)
    at chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:1930:10
    at Array.forEach (native)
    at forEach (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:110:11)
    at HTMLAnchorElement.eventHandler (chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js:1929:5)", source: chrome-extension://jgjejcpgkonhojckmmmcfbmcnohgpkdf/js/lib/angular.js (5526)

tmc commented Mar 19, 2013

This is failing because the cookie-setting eval in appContext.js:setDebug isn't successfully setting the cookie.

tmc commented Mar 19, 2013


Run with --enable-file-cookies -- this should be in the docs.


btford commented Mar 27, 2013

@traviscline Thanks for the advice! This should be added to the docs somewhere.

I'm looking for a better bootstrap method (specifically, other data stores that persist page refreshes), but I suspect you'll run into these types of issues when using a page from file:// regardless of data store.

@ghost ghost referenced this issue Mar 30, 2013


Model view shows empty scope #59


ghost commented Mar 30, 2013

I found a workaround by running Mongoose, a very small web server on Windows that serves the files in the directory it is started from: angular#52

oliverzy commented Apr 8, 2013

Hi Author,

It still doesn't work even I add --enable-file-cookies for file based or local server.
Running on Mac Lion, Chrome 26
I just use the basic sample from AngularJS home page

jn73 commented Apr 10, 2013

Same problem here.. I have it working in one project, failing in another. Both projects uses manual bootstrap'ing. The one that fails uses head.js to load all javascripts, the working on uses requirejs..

Mac Lion Chrome Version 26.0.1410.65

jn73 commented Apr 11, 2013

When i changed my head.js project to just loading javascripts in index-file -section batarang is displaying my models just fine.

My headjs-bootstrap code looks like this:

(function() {
        {jquery: '//'},
        {underscore: '//'},
        {angularjs: '//'},
        {ngResource: '//'},
        {ngStrap: '//'},
        {app: 'assets/javascripts/app.js'},
        {controllers: 'assets/javascripts/controllers.js'},
        {services: 'assets/javascripts/services.js'},
        {directives: 'assets/javascripts/directives.js'},
        function() {
            $(document).ready(function() {
                var $html = $('html');
                angular.bootstrap($html, ['ooApp']);

is there a separate bug for the non-file problems I am having when not using ng-app (manual bootstrap+requirejs)
It seems like this is actually two separate issues!

I get the scope elements in the scope view, but the models are empty.


SomeKittens commented Sep 29, 2015

Using Batarang with files served via file:/// is covered in #79

Manual bootstrapping is covered in #163

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment