No, you probably just don't have externs for Angular--in that case,
advanced optimizations are going to clobber names.

Not positive, but this looks like it may be a proper externs file for
Angular?

https://code.google.com/p/closure-compiler/source/browse/contrib/externs/angular.js?r=f820d7125795a1f2b08d4961a24e7184d8d6add6

DD

(2014/04/06 19:44), Ivan Schuetz wrote:
> Ah... right! I was using advanced optimizations. Changed it to:               
>              
> 
> :optimizations :simple
> 
> Now it works.
> 
> But why do advanced optimizations break the code? Is it buggy?
> 
> 
> 
> 
> 
> 
> Am Sonntag, 6. April 2014 11:27:58 UTC+2 schrieb David Della Costa:
>> Are you using advanced compilation?
>>
>>
>>
>> (2014/04/06 6:49), Ivan Schuetz wrote:
>>
>>> I just started learning ClojureScript.
>>
>>>
>>
>>> It seems my ClojureScript syntax for application module initialisation is 
>>> not correct.
>>
>>>
>>
>>> In Javascript, it has to be:
>>
>>>
>>
>>> angular.module('F1FeederApp', [
>>
>>>   'F1FeederApp.controllers'
>>
>>> ]);
>>
>>>
>>
>>>
>>
>>> I wrote in ClojureScript:
>>
>>>
>>
>>> (.module js/angular "myprooooj" (array "myproj.controllers"))
>>
>>>
>>
>>> And I get in JS:
>>
>>>
>>
>>> angular.Mb("myprooooj", ["myproj.controllers"]);
>>
>>>
>>
>>> This causes an error, since Mb isn't a property of Angular, and I have not 
>>> idea where this comes from.
>>
>>>
>>
>>> I looked for an example online, I found e.g. this gist: 
>>> https://gist.github.com/lynaghk/3856153 , which is pretty much the same:
>>
>>>
>>
>>> (def todomvc
>>
>>>   "Create a TodoMVC module within Angular.js"
>>
>>>   (.module js/angular "todomvc" (array)))
>>
>>>
>>
>>>
>>
>>> Same JS, same error:
>>
>>>
>>
>>> angular.Mb("todomvc", []);
>>
>>>
>>
>>>
>>
>>> What am I doing wrong? According to sources I read this syntax should be 
>>> correct.
>>
>>>
>>
>>>
>>
>>> Thanks.
>>
>>>
> 

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to