New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ui-router resolve, onEnter and onExit #54

Closed
ghengeveld opened this Issue Oct 7, 2013 · 47 comments

Comments

Projects
None yet
@ghengeveld

ghengeveld commented Oct 7, 2013

Since ui-router of the angular-ui project is quickly becoming the de-facto replacement of Angular's routeProvider, it would be good to have full support for it. This means that the 'resolve', 'onEnter' and 'onExit' properties in $stateProvider.state() should be handled by ngmin.

@see https://github.com/angular-ui/ui-router/wiki#onenter-and-onexit-callbacks

@ivangarcia2

This comment has been minimized.

Show comment
Hide comment
@ivangarcia2

ivangarcia2 commented Oct 7, 2013

+1

@darioshanghai

This comment has been minimized.

Show comment
Hide comment
@darioshanghai

darioshanghai commented Oct 14, 2013

+1

@battika

This comment has been minimized.

Show comment
Hide comment
@battika

battika commented Oct 14, 2013

+1

@braco

This comment has been minimized.

Show comment
Hide comment
@braco

braco commented Nov 26, 2013

+1

@dylan-baskind

This comment has been minimized.

Show comment
Hide comment
@dylan-baskind

dylan-baskind Dec 3, 2013

+1

Took me awhile to figure out that this was where my minified code was going bust.

Does anyone have any stop-gap solution for converting the standard form of these functions, i.e.

            # To Do...
            projectData: (someInjectable) ->
                # Return some data

To a minification safe form?

Apologies if this is a noob type question!

D.

dylan-baskind commented Dec 3, 2013

+1

Took me awhile to figure out that this was where my minified code was going bust.

Does anyone have any stop-gap solution for converting the standard form of these functions, i.e.

            # To Do...
            projectData: (someInjectable) ->
                # Return some data

To a minification safe form?

Apologies if this is a noob type question!

D.

@forgetaboutit

This comment has been minimized.

Show comment
Hide comment
@forgetaboutit

forgetaboutit Dec 3, 2013

@dylan-baskind : in our project, we're using

# To do ...
projectData: ["someInjectable", (someInjectable) ->
    # Return some data
]

forgetaboutit commented Dec 3, 2013

@dylan-baskind : in our project, we're using

# To do ...
projectData: ["someInjectable", (someInjectable) ->
    # Return some data
]
@dylan-baskind

This comment has been minimized.

Show comment
Hide comment
@dylan-baskind

dylan-baskind Dec 3, 2013

@forgetaboutit - Cheers for that!

Familiar syntax from the controller declarations, just didn't realise it would also apply here. Thanks for the tip.

dylan-baskind commented Dec 3, 2013

@forgetaboutit - Cheers for that!

Familiar syntax from the controller declarations, just didn't realise it would also apply here. Thanks for the tip.

@gbockus

This comment has been minimized.

Show comment
Hide comment
@gbockus

gbockus commented Dec 20, 2013

+1

@hengkiardo

This comment has been minimized.

Show comment
Hide comment
@hengkiardo

hengkiardo commented Jan 7, 2014

+1

@liujinxing

This comment has been minimized.

Show comment
Hide comment
@liujinxing

liujinxing commented Jan 20, 2014

+1

@leon

This comment has been minimized.

Show comment
Hide comment
@leon

leon commented Jan 21, 2014

+1

@towu

This comment has been minimized.

Show comment
Hide comment
@towu

towu commented Feb 12, 2014

+1

@creat-or

This comment has been minimized.

Show comment
Hide comment
@creat-or

creat-or commented Feb 17, 2014

+1

@liujinxing

This comment has been minimized.

Show comment
Hide comment
@liujinxing

liujinxing commented Feb 17, 2014

+1

@cmcnamara87

This comment has been minimized.

Show comment
Hide comment
@cmcnamara87

cmcnamara87 commented Feb 20, 2014

+1

@stto3703

This comment has been minimized.

Show comment
Hide comment
@stto3703

stto3703 commented Feb 21, 2014

+1

@btford

This comment has been minimized.

Show comment
Hide comment
@btford

btford Mar 3, 2014

Owner

I think #61 will make this easier, so I'll work on getting this in ASAP. :)

Owner

btford commented Mar 3, 2014

I think #61 will make this easier, so I'll work on getting this in ASAP. :)

@btford btford added the enhancement label Mar 3, 2014

@luisfarzati

This comment has been minimized.

Show comment
Hide comment
@luisfarzati

luisfarzati commented Mar 12, 2014

+1

@futurechan

This comment has been minimized.

Show comment
Hide comment
@futurechan

futurechan commented Mar 21, 2014

+1

@martijnve

This comment has been minimized.

Show comment
Hide comment
@martijnve

martijnve commented Mar 26, 2014

+1

@vrodriguezTecsisa

This comment has been minimized.

Show comment
Hide comment
@vrodriguezTecsisa

vrodriguezTecsisa commented Apr 4, 2014

+1

@julianpaulozzi

This comment has been minimized.

Show comment
Hide comment
@julianpaulozzi

julianpaulozzi commented Apr 15, 2014

+1

@jketcham

This comment has been minimized.

Show comment
Hide comment
@jketcham

jketcham commented Apr 15, 2014

👍

@inetfuture

This comment has been minimized.

Show comment
Hide comment
@inetfuture

inetfuture commented Apr 17, 2014

+1

@Urigo

This comment has been minimized.

Show comment
Hide comment
@Urigo

Urigo commented Apr 18, 2014

+1 :)

@mablk

This comment has been minimized.

Show comment
Hide comment
@mablk

mablk commented Apr 21, 2014

+1

@demetriusnunes

This comment has been minimized.

Show comment
Hide comment
@demetriusnunes

demetriusnunes commented Apr 22, 2014

+1

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch Apr 30, 2014

Hi guys,

if you need this feature I would recommend to try ng-annotate, which supports this in its new bleeding edge version (see here for examples).

// cc @olov

donaldpipowitch commented Apr 30, 2014

Hi guys,

if you need this feature I would recommend to try ng-annotate, which supports this in its new bleeding edge version (see here for examples).

// cc @olov

@pensierinmusica

This comment has been minimized.

Show comment
Hide comment
@pensierinmusica

pensierinmusica commented May 7, 2014

+1 :)

@andycaramba

This comment has been minimized.

Show comment
Hide comment
@andycaramba

andycaramba May 10, 2014

and up again 👍

andycaramba commented May 10, 2014

and up again 👍

@kikonen-fiksu

This comment has been minimized.

Show comment
Hide comment
@kikonen-fiksu

kikonen-fiksu May 14, 2014

Changes that any fixes for this are merged some day? i.e. I just hit trouble with ngmin and "ui-router" "resolve"s.

kikonen-fiksu commented May 14, 2014

Changes that any fixes for this are merged some day? i.e. I just hit trouble with ngmin and "ui-router" "resolve"s.

@donaldpipowitch

This comment has been minimized.

Show comment
Hide comment
@donaldpipowitch

donaldpipowitch May 15, 2014

Seriously, check ng-annotate. Here is a comparison between ng-annotate and ngmin.

donaldpipowitch commented May 15, 2014

Seriously, check ng-annotate. Here is a comparison between ng-annotate and ngmin.

@kikonen-fiksu

This comment has been minimized.

Show comment
Hide comment
@kikonen-fiksu

kikonen-fiksu May 15, 2014

Q: does it have rails assets pipeline integration?

kikonen-fiksu commented May 15, 2014

Q: does it have rails assets pipeline integration?

@olov

This comment has been minimized.

Show comment
Hide comment
@olov

olov May 15, 2014

@donaldpipowitch That link shows which 24 open ngmin issues that just work in ng-annotate. In addition, there are 6 open ngmin issues that work in ng-annotate with a workaround. See full annotated issue list.

But Instead of just looking at that list I recommend reading the more elaborate comparison I wrote yesterday in issue #93 - The future of ngmin and ng-annotate. @kikonen-fiksu: That comparison also describes where ng-annotate is trailing ngmin, in particular not as extensive tooling integration (although Grunt, Browserify, Brunch and Gulp is there so far and more is coming). Q: "does ng-annotate have rails assets pipeline integration?" A: "not currently, but hopefully very soon". It should be a 30 minute job for a rails/ruby/gem savvy person to create it.

olov commented May 15, 2014

@donaldpipowitch That link shows which 24 open ngmin issues that just work in ng-annotate. In addition, there are 6 open ngmin issues that work in ng-annotate with a workaround. See full annotated issue list.

But Instead of just looking at that list I recommend reading the more elaborate comparison I wrote yesterday in issue #93 - The future of ngmin and ng-annotate. @kikonen-fiksu: That comparison also describes where ng-annotate is trailing ngmin, in particular not as extensive tooling integration (although Grunt, Browserify, Brunch and Gulp is there so far and more is coming). Q: "does ng-annotate have rails assets pipeline integration?" A: "not currently, but hopefully very soon". It should be a 30 minute job for a rails/ruby/gem savvy person to create it.

@kikonen-fiksu

This comment has been minimized.

Show comment
Hide comment
@kikonen-fiksu

kikonen-fiksu May 15, 2014

Thx, I may try to take peek on this assets integ.

kikonen-fiksu commented May 15, 2014

Thx, I may try to take peek on this assets integ.

@olov

This comment has been minimized.

Show comment
Hide comment
@olov

olov May 15, 2014

@kikonen this discussion does not belong is this thread so let's take it elsewhere (email/twitter/issue). FWIW ng-annotate does not require ES6 because defs, info in BUILD.md

olov commented May 15, 2014

@kikonen this discussion does not belong is this thread so let's take it elsewhere (email/twitter/issue). FWIW ng-annotate does not require ES6 because defs, info in BUILD.md

@kikonen

This comment has been minimized.

Show comment
Hide comment

kikonen commented May 16, 2014

@chovy

This comment has been minimized.

Show comment
Hide comment
@chovy

chovy commented May 20, 2014

+1

@vincentjr

This comment has been minimized.

Show comment
Hide comment
@vincentjr

vincentjr commented May 20, 2014

+1 :D

@indianazhao

This comment has been minimized.

Show comment
Hide comment
@indianazhao

indianazhao commented May 22, 2014

+1

@didil

This comment has been minimized.

Show comment
Hide comment
@didil

didil commented May 29, 2014

+1

@andredublin

This comment has been minimized.

Show comment
Hide comment
@andredublin

andredublin commented Jun 11, 2014

+1

@turkingj

This comment has been minimized.

Show comment
Hide comment
@turkingj

turkingj commented Jun 12, 2014

+1

@creat-or

This comment has been minimized.

Show comment
Hide comment
@creat-or

creat-or Jun 12, 2014

I also switched to ng-annotate about a month ago and haven't looked back.

creat-or commented Jun 12, 2014

I also switched to ng-annotate about a month ago and haven't looked back.

@bdefore

This comment has been minimized.

Show comment
Hide comment
@bdefore

bdefore commented Jul 2, 2014

+1

@mattupstate

This comment has been minimized.

Show comment
Hide comment
@mattupstate

mattupstate Jul 9, 2014

Would this be a result of ngmin not "supporting" ui-router?

[Error] Error: [$injector:unpr] Unknown provider: aProvider <- a <- $http <- $templateFactory <- $view <- $state
http://errors.angularjs.org/1.2.19/$injector/unpr?p0=aProvider%20%3C-%20a%20%3C-%20%24http%20%3C-%20%24templateFactory%20%3C-%20%24view%20%3C-%20%24state
    (anonymous function) (app.js, line 2)
    c (app.js, line 2)
   ... lots more ...

mattupstate commented Jul 9, 2014

Would this be a result of ngmin not "supporting" ui-router?

[Error] Error: [$injector:unpr] Unknown provider: aProvider <- a <- $http <- $templateFactory <- $view <- $state
http://errors.angularjs.org/1.2.19/$injector/unpr?p0=aProvider%20%3C-%20a%20%3C-%20%24http%20%3C-%20%24templateFactory%20%3C-%20%24view%20%3C-%20%24state
    (anonymous function) (app.js, line 2)
    c (app.js, line 2)
   ... lots more ...
@eddiemonge

This comment has been minimized.

Show comment
Hide comment
@eddiemonge

eddiemonge Aug 7, 2014

Collaborator

Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93

If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues

If you really want ngmin to fix this issue, feel free to fork it and use that.

Collaborator

eddiemonge commented Aug 7, 2014

Please try https://github.com/olov/ng-annotate. ngmin is now deprecated: #93

If your issue isn't resolved there please open an issue at https://github.com/olov/ng-annotate/issues

If you really want ngmin to fix this issue, feel free to fork it and use that.

@eddiemonge eddiemonge closed this Aug 7, 2014

istonikula added a commit to HSLdevcom/parkandrideAPI that referenced this issue Sep 21, 2014

chore(grunt): switch from ngmin to ngAnnotate
Among other, this gives annotation support for ui-router, more info:
- btford/ngmin#54
- https://github.com/olov/ng-annotate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment