by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 06 11:06
    maritaria commented #3510
  • Aug 06 10:49
    stedda closed #3818
  • Aug 06 10:49
    stedda commented #3818
  • Aug 06 10:41
    hjort-e commented #3818
  • Aug 06 10:38
    hjort-e commented #3818
  • Aug 06 10:21
    aluk-dev commented #3818
  • Aug 06 10:04
    stedda edited #3818
  • Aug 06 10:04
    stedda edited #3818
  • Aug 06 10:04
    stedda opened #3818
  • Aug 03 17:06

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Aug 03 17:06
    dependabot-preview[bot] closed #273
  • Aug 03 17:06
    dependabot-preview[bot] commented #273
  • Aug 03 17:06
    dependabot-preview[bot] labeled #277
  • Aug 03 17:06
    dependabot-preview[bot] opened #277
  • Aug 03 17:06

    dependabot-preview[bot] on npm_and_yarn

    build(deps-dev): bump fork-ts-c… (compare)

  • Aug 03 17:04

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Aug 03 17:04
    dependabot-preview[bot] closed #274
  • Aug 03 17:04
    dependabot-preview[bot] commented #274
  • Aug 03 17:04
    dependabot-preview[bot] labeled #276
  • Aug 03 17:04
    dependabot-preview[bot] opened #276
Mark Clark
@daerogami

I've run into a puzzling issue. I have an AngularJS app (v1.4.8) with ui-router (v1.0.15)
It runs in chrome, firefox and edge; however, does not run anymore in IE11 (it has worked in the past on the same packages)
...Error: [$injector:modulerr] Failed to instantiate module ui.router.init due to: TypeError: Object doesn't support property or method 'find' at getParamDeclaration (http://local.wpr/node_modules/@uirouter/angularjs/release/angular-ui-router.js?v=636695016979932334:1603:9)...

Im aware that IE11 doesnt support array.prototype.find() but that doesnt explain how this worked previously. I tried adding a polyfill for find and I still get the same error. Has anyone encountered this?

Mark Clark
@daerogami
scratch that... i just hardcoded a polyfill from a CDN instead of letting ocLazyLoad add it. Its working now. Still no idea how it worked in the past w/o this polyfill
Chris Thielen
@christopherthielen
@codymikol this confusion is why injecting $stateParams is now deprecated
The object injected into anything transition scoped (i.e., resolves and routed controllers) is not the same as the global $stateParams service object
@codymikol here's some information on redirecting using TargetState: https://ui-router.github.io/guide/transitionhooks#redirecting-a-transition
@daerogami sorry about the .find() problem. this has been fixed in master and will be released shortly.
Chris Thielen
@christopherthielen
@daerogami in short, ui-router shouldn't be publishing code that uses ES6 features
Cody Mikol
@codymikol
Thanks @christopherthielen
Tom McKearney
@tommck
All, w/ ui-router in Angular, can we have parent/child states yet only have one ui-view? Samples seem to add a child view. I was thinking of parent/child stats for modularity (especially when lazy loading modules)
Cody Mikol
@codymikol
I believe you have to add another ui view if you want nested children
You can just add that as the template of the state
Tom McKearney
@tommck
thanks. I figured that was the answer. still might work out ok for me. I guess at worst, the parent state could just have a ui-view in it :)
Cody Mikol
@codymikol
I’m doing exactly that, it should he’s as simple as template:”<div ui-view></div>”
Tom McKearney
@tommck
yeah :) I'll probably do that. Thanks
Tom McKearney
@tommck
In Angular, if you use UiRouterModule.forChild(... states), does that mean these are parent/child view like states? in other words, do I need parent/child ui-views?
Chris Thielen
@christopherthielen
forChild only means that the Angular Module is not the root angular module. It doesn't imply anything about parent/child state relationships
Tom McKearney
@tommck
oh, cool. so we could actually configure states in individual modules rather than all in one place
Chris Thielen
@christopherthielen
it's the same pattern (forRoot/forChild) you see in many angular libs
yes
Tom McKearney
@tommck
yeah, still haven't gotten 100% used to that yet :)
Chris Thielen
@christopherthielen
yeah it's weird :)
Tom McKearney
@tommck
Thanks for the quick response @christopherthielen
Chris Thielen
@christopherthielen
:thumbsup:
Phong ca
@phongca22
$stateChangeStart is not fired in the first time when using manual bootstraping. When I go to another state, it's working, what is happening in this case?
Zurie
@zurie

@christopherthielen have you ever seen this? I am trying to update from Angular 5 to angular6 ui-router, etc. angular 5.2.5 is working great with UI-Router 1.1.0 not sure what happens or if its ui-router, but i can't get angular 6 to update properly for the life of me, when I feel like I have everything correct and all my packages seem ready i run the app and i get bombarded with these errors.

ERROR in ./src/app/welcome/welcome.component.ts
Module not found: Error: Can't resolve '../resize.service' in '/Users/Zuriel/Repository/ZA2017/src/app/welcome'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/bar/bar.module' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/baz/baz.service' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/foo/foo.module' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/footer/footer.component' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/header/header.component' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/header/nav/nav.component' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/myapi.service' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve './app/sidenav-service.service' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/app/welcome/welcome.module.ts
Module not found: Error: Can't resolve './hello/hello.component' in '/Users/Zuriel/Repository/ZA2017/src/app/welcome'
ERROR in ./src/za.module.ts
Module not found: Error: Can't resolve 'ui-router-ng2' in '/Users/Zuriel/Repository/ZA2017/src'
ERROR in ./src/app/error/error.module.ts
Module not found: Error: Can't resolve 'ui-router-ng2' in '/Users/Zuriel/Repository/ZA2017/src/app/error'
ERROR in ./src/app/welcome/welcome.module.ts
Module not found: Error: Can't resolve 'ui-router-ng2' in '/Users/Zuriel/Repository/ZA2017/src/app/welcome'

the thing is, half of that crap isn't even part of my project.. can't find bar/bar.module, etc those were things I started with a year + ago and have deleted so long ago, why are they even showing up...

Zurie
@zurie
nvmd figured it out
Chris Thielen
@christopherthielen
I don’t understand the question
Zurie
@zurie
@codymikol like this <a uiSref="^">Go Back</a>
when not in a parent relationship.. cant you just use the URL of what it is?
like "/" or "home" or whatever your state you want it to be is?
Cody Mikol
@codymikol
Well I have a back button that I want to just bring you back one path
And a state that is /workflow as well as one that is /workflow:workflowId
The second is not a parent of the first
So calling state.go(‘^’) will attempt to go to an abstract root state that I have
I ended up making everything have a parent child relationship
Which works but not really as I’d like it to
As we have requirements that we should not retain any data between different states
Tom McKearney
@tommck
Hey all, does anyone know which of the LifeCycle hooks occurs just before resolve parameters for the next state are evaluated? I find it hard to understand the order of operations in a state transition
tommck @tommck thinks it's onExit
During a transition, some states may be exited, retained, and/or entered.
onExit first, then onRetain, finally onEnter
Each of these hooks happen for each state in the transition
so, multiple onExit hooks may be called if multiple states are exited. Likewise with onRetain and onEnter
@tommck
resolve data is fetched during onEnter
general advise is to use an onStart hook if you want to do something before resolve data is fetched. If you need more granularity than that you can of course use any other hook