angularjs_scaffold icon indicating copy to clipboard operation
angularjs_scaffold copied to clipboard

generator does not account for production mode js minification of the rails asset pipeline.

Open explainer opened this issue 12 years ago • 3 comments

When deploying in production mode to heroku, for example, the implicit dependency injection logic of AngularJS gets disabled by the js minification and obfuscation associated with the rails asset pipeline.

It is necessary to use an explicit inject function to define controller parameters.

The temporary work around is to set:

config.assets.compress = false 

in

environments/production.rb

See http://docs.angularjs.org/tutorial/step_05, A Note on Minification, for more information.

explainer avatar Dec 18 '12 16:12 explainer

Brian Ford is working on a minifier that doesn't require doing any hack https://github.com/btford/ngmin

patcito avatar Jan 04 '13 23:01 patcito

Thanks for the info, Patrick. I will check it out.

On 4 January 2013 15:29, Patrick Aljord [email protected] wrote:

Brian Ford is working on a minifier that doesn't require doing any hack https://github.com/btford/ngmin

— Reply to this email directly or view it on GitHubhttps://github.com/patcito/angularjs_scaffold/issues/10#issuecomment-11904830.

Regards,

Ken

Seek wisdom through disbelief

explainer avatar Jan 04 '13 23:01 explainer

I merged your branch and squashed a few of your commits. You'll have to pull and push --hard to your git repo.

On Sat, Jan 5, 2013 at 12:35 AM, Ken Burgett [email protected]:

Thanks for the info, Patrick. I will check it out.

On 4 January 2013 15:29, Patrick Aljord [email protected] wrote:

Brian Ford is working on a minifier that doesn't require doing any hack https://github.com/btford/ngmin

— Reply to this email directly or view it on GitHub< https://github.com/patcito/angularjs_scaffold/issues/10#issuecomment-11904830>.

Regards,

Ken

Seek wisdom through disbelief

— Reply to this email directly or view it on GitHubhttps://github.com/patcito/angularjs_scaffold/issues/10#issuecomment-11904978.

patcito avatar Jan 04 '13 23:01 patcito