modified for angual-ui-router 2.0 support