its better to intialize the view in the router only where its needed. Here it initializes for all the pages.