<body ng-init="user=${userid};month=${month};curpagenum=${currentpage}">
i wrote jsp,and initial value in body tag, in controller,i wrote:
console.debug($scope.user + " "+$scope.month}
but $scope.month have value,$scope.user displays undefined, , after tries, found if value contains letters,it display undefine,only pure number can work.
i don't know why happen,so can me solve this?thank much
because initialisation of variables not wrap values in strings failing assign. js reading user=mary;
i.e. assign variable mary
user
. that's why numbers work. try :
<body ng-init="user='${userid}';month=${month};curpagenum=${currentpage}">
Comments
Post a Comment