I have to send "id" of flight on which manager clicks approved so do to that i want php var to go in angular var somehow. I did this where the error mentioned in title occurs.
<input type="hidden" ng-init="id[index++]='<?php echo $flight['id']; ?>'">
Any idea about which '[' is angular compiler talking about and how to write correct expression like this? Much thanks. In angular :-
$scope.id=[];
$scope.index=0;
Okay i got a great answer which says to escape quote you can use '\' and now I am trying :-
<input type="hidden" ng-init="id[index++]='<?php echo $flight'\['id']'; ?>'">
But it still isn't working and is giving this error "unexpected "[" at line: blah". Can anyone add "\" in my above mentioned line and plis make me get rid of this headache?