我在控制器中有这个数组对象,如何将此对象保存到本地存储,然后在 Angular 中的整个应用程序中访问此本地存储(我使用 ngStorage)
$scope.drivers = [{
"entity$": "-/sys/daily_journeys",
"name": "Tom David",
"journey_count": 90,
"traveled_distance": "773",
"total_risk": 0.367,
"days": 22,
"id_device": "4564645",
"avg_risk": "0.0",
"risk_category": "GREEN"
}, {
"name": "James Doc",
"journey_count": "-",
"traveled_distance": "-",
"total_risk": "-",
"days": "-",
"id_device": 32423435,
"avg_risk": "-",
"risk_category": "NONE"
}, {