Closed kathygit closed 11 years ago
can you please post the exact error message and also which minifier you used?
Thanks you for there reply.
The only error I see in the console is "can't find configApp".
Here is the snippet of the minified js:
angular.module("contenteditable",[]).directive("contenteditable",["$timeout",function(a){
return{
restrict:"A",
require:"?ngModel",
link:function(b,c,d,e) {
if(e){
c.bind("input",function(){
b.$apply(function(){
var b,f,g; <---- there is a b in the outer scope… maybe that is the issue.
b=c.html(),g=!1,d.stripBr&&"false"!==d.stripBr&&(b=b.replace(/
$/,"")),d.noLineBreaks&&"false"!==d.noLineBreaks&&(f=b.replace(/
From: Dmitri Akatov notifications@github.com<mailto:notifications@github.com> Reply-To: akatov/angular-contenteditable reply@reply.github.com<mailto:reply@reply.github.com> Date: Tuesday, October 15, 2013 1:27 PM To: akatov/angular-contenteditable angular-contenteditable@noreply.github.com<mailto:angular-contenteditable@noreply.github.com> Cc: Corporate User kathy.laird@emc.com<mailto:kathy.laird@emc.com> Subject: Re: [angular-contenteditable] minify fails (#7)
can you please post the exact error message and also which minifier you used?
— Reply to this email directly or view it on GitHubhttps://github.com/akatov/angular-contenteditable/issues/7#issuecomment-26364614.
If I move contenteditable.js before http-auth-interceptors.js, it works. It is odd that the order matters here.
The problem is caused by a missing semicolon at the end of angular-contenteditable.js.
After source files are concatenated and if the next file starts with a parenthesis the JS engine thinks that it's all part of a single anonymous function call. Adding a semicolon at the end of the file would fix this problem.
When I use this component in dev-mode it is fine. But when it is minified, it cause the app to fail.