mishrsud / mvc-mini-profiler

Automatically exported from code.google.com/p/mvc-mini-profiler
0 stars 0 forks source link

mini profiler 1.3 broke knockout.js #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
when I updated to version 1.3, knockout.js stopped working properly.

It now gives me "Uncaught Template command not found: ko_code" error.

It worked fine in 1.2

Original issue reported on code.google.com by milutino...@gmail.com on 18 Jun 2011 at 5:44

GoogleCodeExporter commented 8 years ago
I am also experiencing the same issue. When I revert back to version 1.2 this 
"Uncaught Template command" error goes away.

Original comment by paige.c...@gmail.com on 20 Jun 2011 at 12:15

GoogleCodeExporter commented 8 years ago
Same here. It breaks knockout or it's creating some other javascript error 
which is breaking the knockout js.

Original comment by wvdomin...@gmail.com on 20 Jun 2011 at 1:31

GoogleCodeExporter commented 8 years ago

Original comment by jarrod.m.dixon on 20 Jun 2011 at 5:07

GoogleCodeExporter commented 8 years ago
It has something to do with when knockout.js creates it's script bock depending 
on the version of jQuery templates you are using. Here is some code I found in 
knockout.js:

    this['createJavaScriptEvaluatorBlock'] = function (script) {
        if (this.jQueryTmplVersion == 1)
            return "{{= " + script + "}}";

        // From v2, jquery-tmpl does some parameter parsing that fails on nontrivial expressions.
        // Prevent it from messing with the code by wrapping it in a further function.
        return "{{ko_code ((function() { return " + script + " })()) }}";
    },

Original comment by wvdomin...@gmail.com on 20 Jun 2011 at 6:06

GoogleCodeExporter commented 8 years ago
I've broken out our jquery.tmpl code into its own embedded file; we'll only 
download it if another version isn't present (using yepnope).

Original comment by jarrod.m.dixon on 21 Jun 2011 at 8:24

GoogleCodeExporter commented 8 years ago
This appears to have fixed the problem for me.

Original comment by wvdomin...@gmail.com on 21 Jun 2011 at 2:09