Hi there! I am a newcomer to Zend Framework 2 and I am exploring the integration of AngularJS into my project.
Currently, I am calling a function in the controller like this:
return new ViewModel(array(
'result' => $result,
'userData' => $row,
'userInfo' => $userInfo,
));
And in the view page, I am simply looping through the data:
<?php if($this->result) { ?>
<?php foreach ($this->result as $data) { ?>
<tr>
<td><?php echo $data['patient_fname']; ?></td>
<td><?php echo $data['weight']; ?></td>
<td><?php echo $data['height']; ?></td>
<td><?php echo $data['bp_level_low']; ?>/<?php echo $data['bp_level_high']; ?></td>
<!--<td><?php echo $data['sugar_level_random']; ?></td>-->
<td>
<a href="<?php echo $this->url('doctor', array('action'=>'editvitalrecords', 'id' => $data['hrid'] ));?>"> Edit </a>
<!--<a href="<?php echo $this->url('doctor', array('action'=>'deletevitalrecords', 'id' => $data['hrid'] ));?>"> Delete </a>-->
</td>
</tr>
<?php } ?>
<?php } ?>
I am now looking for ways to incorporate AngularJS into the existing code. Any suggestions would be appreciated!
Thank you.