Add resolve and register function in controller