dotJEM / angular-routing

Enhanced state based routing for Angular applications!
https://dotjem.github.io/angular-routing/
MIT License
75 stars 9 forks source link

StateClass Object #38

Closed jeme closed 11 years ago

jeme commented 11 years ago

States are already stored in a Tree structure, but the StateProvider manages most of the tasks of manipulating this structure.

This could be cleaned up by delegating more responsibility to the a state class (mimicing an OO class).

That allows for simpler code when e.g. looking up states (using recursion) ect... It also allows functions to operate in the scope of the state rather than the while tree.

(Routes could use the same treatment)

jeme commented 11 years ago

StateClass, StateFactory, StateBrowser and StateRules classes has all been added to make it easier to maintain and also test in the future as it seperates concern into smaller enteties.