add loading template and hook in router