Reputation: 35
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
}
This is not working.
Upvotes: 1
Views: 1622
Reputation: 498
Try This:-
obj = ['sha','abc','xyz] //javascript array
function myclrt($scope) //this angular js function
{
$scope.one = obj[0]; // Typo $Scope -> $scope
}
Upvotes: 1