Answer the question
In order to leave comments, you need to log in
How to do this in Angular?
Happy New Year!
How would such PHP code be in Angular?
<?
$array = array('one' => array('name'=>'Маша'));
$b = 'one';
echo $array[$b]['name']; //Маша
?>
...
$scope.array= [{'one': { name: 'Маша'}}];
$scope.b = 'one';
alert(/* Здесь как? */ );
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question