Ensure state is initialized when angular loads
Fixes a bug where state could be undefined while angular was running its initial digest cycle and initializing controllers.
Fixes a bug where state could be undefined while angular was running its initial digest cycle and initializing controllers.