我希望将ngStorage的值添加到locastorage addIdMatch。而在我的代码中,当我刷新页面时,它会替换已存在的值。
$scope.addIdMatch = function(infoMatchHomeTeam, infoMatchGoalHomeTeam, infoMatchGoalAwayTeam, infoMatchAwayTeam) {
$i = $i +1
$localStorage[$i] = {
infoMatchHomeTeam, infoMatchGoalHomeTeam, infoMatchGoalAwayTeam, infoMatchAwayTeam
}
};