For instance
<div ng-repeat = 'list in lists'>
<?php
$user_post_id = "{{list.user.id}}"; //this syntax works
var_dump($user_post_id); // gives String(16) '1'
$user_post_int_id = (int)$user_post_id; // change from string to int
var_dump($user_post_int_id); // gives int(1) 0, I don't know why isn't type conversion working!
echo $user_post_id; // echoes out 1
echo $user_post_int_id; //echoes out the 0
So the main problem I think is of type conversion, as I tried one more thing where String(1) is converting to int(1) with no problem but with string(16) everything blows apart and results to 0.