矢印をクリックして同じ状態に変更するページを取得しようとしていますが、新しいオブジェクトを表す新しいオブジェクト項目に更新しようとしていますビューでスライドします。角度 - URLがstate.goで更新されていますが、表示がレンダリングされていません
私のコードでは、私はURLを変更しますが、ビューは更新されません。
これは唯一の最初のスライドで発生するようですので、次の質問への矢印をクリックすると更新されませんでしたが、ページをリフレッシュしてクリックすると他の質問。
もう1つの例として、2番目、3番目、または4番目のアイテムをクリックしてスライダーに移動し、次に最初から移動しない限り、そこから次のアイテムをクリックしてください次のオブジェクトアイテムにスルーします。
// Index of the current item in the items array
scope.itemIndex = assessment.test.items.indexOf(item._id);
scope.numberOfItems = assessment.test.items.length;
// Checks if the index is not equal to the length of items
if (scope.itemIndex !== scope.numberOfItems) {
var nextItemId = assessment.test.items[scope.itemIndex + 1];
}
// Checks if the index of the item is not greater than zero
if (scope.itemIndex > 0) {
var previousItemId = assessment.test.items[scope.itemIndex - 1];
}
/**
* Go to the next question
*/
scope.next = function() {
state.go('app.main.3Col.results.details', { itemId: nextItemId, assessmentId: assessment._id }, { refresh: true });
};
/**
* Go to the previous question
*/
scope.previous = function() {
state.go('app.main.3Col.results.details', { itemId: previousItemId, assessmentId: assessment._id }, { refresh: true });
};
状態設定で 'reloadOnSearch'を設定しましたか? Trueがデフォルトですが、同じ状態にナビゲートするときにリロードを停止するので、falseに設定されていないことを確認してください。 – Duncan