Put gotoPage() on the scope to template can trigger it