Fix typo in prior element ID and modify the index with Angular as well