My development process involves using ionic to create an application. While most of the links work without any issues, I have encountered a specific problem with one list in ionicview. The HTML code for this particular list is as follows:
<ion-list class="indexed-list">
<ion-item
class="item item-avatar"
ng-repeat="item in categoriesEntity"
ui-sref="app.entityListSubCategory({subCategoryId: item.id})"
>
<img src="img/ionic.png">
<h2 ng-bind="item.name"></h2>
<span
class="header assertive"
ng-if="item.name.substr(0, 1) !== categoriesEntity[$index - 1].name.substr(0, 1)"
ng-bind="item.name.substr(0, 1)"
></span>
</ion-list>
</ion-list>
This issue persists only in ionicview, as the list functions correctly in browsers, emulators, and devices. I have attempted different solutions such as replacing ui-sref
with ng-click="alert('hello')"
, but the problem remains unresolved. Moving or duplicating the ui-sref
attribute to the img
and h2
tags did not yield any results either. I also tried utilizing $state
service to change routes instead of ui-sref
, but to no avail.
To troubleshoot, I continuously monitor my console for JavaScript errors. Interestingly, no JS errors are triggered when tapping on the ion-item
.