by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 10 05:56
    stale[bot] labeled #3795
  • Jul 10 05:56
    stale[bot] commented #3795
  • Jul 06 23:29
    Jaymmyin opened #235
  • Jul 06 14:41

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Jul 06 14:41
    dependabot-preview[bot] closed #253
  • Jul 06 14:41
    dependabot-preview[bot] commented #253
  • Jul 06 14:41
    dependabot-preview[bot] labeled #265
  • Jul 06 14:41
    dependabot-preview[bot] opened #265
  • Jul 06 14:41

    dependabot-preview[bot] on npm_and_yarn

    build(deps): bump preact from 8… (compare)

  • Jul 05 21:14

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Jul 05 21:14

    dependabot-preview[bot] on npm_and_yarn

    (compare)

  • Jul 05 21:14
    dependabot-preview[bot] closed #261
  • Jul 05 21:14
    dependabot-preview[bot] closed #257
  • Jul 05 21:14
    dependabot-preview[bot] commented #261
  • Jul 05 21:14
    dependabot-preview[bot] commented #257
  • Jul 05 21:14
    dependabot-preview[bot] labeled #264
  • Jul 05 21:14
    dependabot-preview[bot] labeled #263
  • Jul 05 21:14
    dependabot-preview[bot] opened #264
  • Jul 05 21:14
    dependabot-preview[bot] opened #263
  • Jul 05 21:14

    dependabot-preview[bot] on npm_and_yarn

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

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
You could theoretically even add an onEnter hook that is higher priority than the hook that fetches resolve data if you want to execute code just before the resolves are fetched. However, this smells not quite right
Chris Thielen
@christopherthielen
Tom McKearney
@tommck
so, let's say I have messages that are associated with a ui state at the top of the screen and want to clear then on state transition. YOu think onStart is the right place for that?
messages for the new state can be added in resolves
Chris Thielen
@christopherthielen
onExit seems appropriate for that
FWIW I only ever use resolve to fetch data. I use a hook like onEnter/onStart/onFinish for everything else.
Tom McKearney
@tommck
@christopherthielen our API sends a HAL-like format back with data and messages/alerts and permission data all in one structure
Chris Thielen
@christopherthielen
👍
Troy Hawley
@troywoy
Is there a way to prevent ui-router from stripping unspecified parameters from the hash? For example I have /#!/foobar/?id=123&randomVar=apples&anotherRandomVar=carrots with a route url defined as foobar/?id. Since my random vars aren't part of the route they seem to be removed and I'm not entirely sure if it's my fault or intended via library code. There's a variety of parameters I would like to support, and I don't want to have to put each and every one on the route (I'd rather do something like $location.search().randomVar if I need to use it).