added dependency injection to the router to fix minification issue