Skip to content
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
Closed

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

ghengeveld opened this issue Oct 7, 2013 · 47 comments

Comments

@ghengeveld
Copy link

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:/angular-ui/ui-router/wiki#onenter-and-onexit-callbacks

@ivangarcia2
Copy link

+1

3 similar comments
@arebelrossi
Copy link

+1

@battika
Copy link

battika commented Oct 14, 2013

+1

@braco
Copy link

braco commented Nov 26, 2013

+1

@dylan-baskind
Copy link

+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
Copy link

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

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

@dylan-baskind
Copy link

@forgetaboutit - Cheers for that!

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

@gbockus
Copy link

gbockus commented Dec 20, 2013

+1

8 similar comments
@hengkiardo
Copy link

+1

@liujinxing
Copy link

+1

@leon
Copy link

leon commented Jan 21, 2014

+1

@towu
Copy link

towu commented Feb 12, 2014

+1

@27leaves
Copy link

+1

@liujinxing
Copy link

+1

@cmcnamara87
Copy link

+1

@stto3703
Copy link

+1

@btford
Copy link
Owner

btford commented Mar 3, 2014

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

@luisfarzati
Copy link

+1

@futurechan
Copy link

+1

5 similar comments
@martijnve
Copy link

+1

@vrodriguezTecsisa
Copy link

+1

@julianpaulozzi
Copy link

+1

@jketcham
Copy link

👍

@inetfuture
Copy link

+1

@Urigo
Copy link

Urigo commented Apr 18, 2014

+1 :)

@mablk
Copy link

mablk commented Apr 21, 2014

+1

1 similar comment
@demetriusnunes
Copy link

+1

@donaldpipowitch
Copy link

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
Copy link

+1 :)

@andycaramba
Copy link

and up again 👍

@kikonen-fiksu
Copy link

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

@donaldpipowitch
Copy link

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

@kikonen-fiksu
Copy link

Q: does it have rails assets pipeline integration?

@olov
Copy link

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
Copy link

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

@olov
Copy link

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
Copy link

kikonen commented May 16, 2014

First draft: https:/kikonen/ngannotate-rails

@ralyodio
Copy link

+1

@vincentjr
Copy link

+1 :D

@indianazhao
Copy link

+1

3 similar comments
@didil
Copy link

didil commented May 29, 2014

+1

@andredublin
Copy link

+1

@turkingj
Copy link

+1

@27leaves
Copy link

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

@bdefore
Copy link

bdefore commented Jul 2, 2014

+1

@mattupstate
Copy link

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
Copy link
Collaborator

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

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

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

istonikula added a commit to HSLdevcom/parkandrideAPI that referenced this issue Sep 21, 2014
Among other, this gives annotation support for ui-router, more info:
- btford/ngmin#54
- https:/olov/ng-annotate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests