1
obj = ['sha','abc','xyz] //javascript array
function myclrt($scope) //this angular js function
{
$Scope.one = obj[0]; // obj[0] is not being assinged to scope.one
}
這不起作用。將javascript數組賦值給angularjs變量
POSS錯字'$ Scope'? – Dinesh 2014-12-06 08:59:49
我想將'sha'(viz obj [0])賦值給$ scope.one(這是angularjs變量) – 2014-12-06 09:10:01
Typo,請嘗試'$ scope'而不是'$ Scope'。 – 2014-12-06 10:52:15