assign javascript array value to angularjs variable -


obj = ['sha','abc','xyz] //javascript array  function myclrt($scope) //this angular js function {     $scope.one = obj[0]; // obj[0] not being assinged scope.one } 

this not working.

try this:-

obj = ['sha','abc','xyz] //javascript array function myclrt($scope) //this angular js function {    $scope.one = obj[0]; // typo $scope -> $scope } 

Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -