Update Application.js

Fix issue when application uses template, waiting for route initialization before starting History mechanism.