I have searched this forum, google and Stackoverflow, built sites with 
angularjs, github etc...

There are no samples or helpful material to fullfil my requirements.

That is my plunker: http://plnkr.co/edit/GMfMcXgHguYjFYoxWEaM?p=preview

I like angularJS so far but the 'ui router' module seems really a 
limitation for what I need or I do it totally wrong.

If you look at the plunker there is a planner button with 3 views 
day/week/month.

For all 3 states day/week/month I would like to have these 3 url`s in the 
browser url bar e.g.:

/#/projects/1/dateplanner/day/"CurrentDate"
/#/projects/2/dateplanner/week/"FirstDayOfWeek"
/#/projects/3/dateplanner/month/7

At the moment I have "hacked" the day url but there are still many "day 
state" scenarios where the passed current date gets lost from the url e.g.

- switching between "date planner" and "document browser" button the url is 
then /#/projects/43/dateplanner/day/-- (current date is missing)
  even worse is that my day "hack" has introduced a bad behavior that is 
the day controller shows the alert('daily') TWO times ?!
- Manipulating the day states date in the url bar , I am still unsure 
wether I should go in direction stateChangeStart on rootscope
- When I switch from the week/month state away by pressing the day button 
there is again the current date missing in the 
url #/projects/43/dateplanner/day/--

The same bugs are in the week/month state where I get only these urls:

/#/projects/2/dateplanner/week/
/#/projects/3/dateplanner/month

That means there are at least 3 cases where the url can get wrong for all 3 
states.

All the ui router samples I have found are super simple... have as always 
nothing to do with real life requirements so I ask you guys here on the 
forum.

1.) What is the recommended approach to get the 3 cases done correctly with 
the ui-router?
2.) Is there any hook mechanism that allows my to write my FirstDayOfWeek, 
month number etc... into the $state/$stateparams before the state is 
activated/accepted because all parameters in the url match to a state?








-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to