無論何時會話變量不具有該值,我都會將錯誤顯示爲'Unexpected Token u'。我的代碼是..意外令牌ü
var myApp = angular.module('MyApp ', ['ngStorage']);
myApp .controller('MyApp Ctrl', ['$scope', '$http', '$sessionStorage',
function ($scope, $http, $sessionStorage,) {
$scope.selectedDoctor = JSON.parse(sessionStorage.DocOID);
}]);
Eventhough我試圖像我一樣爲
$scope.selectedDoctor = JSON.parse($sessionStorage.DocOID);
諮詢.....
你是怎麼的sessionStorage添加數據? –