I tried using <div>{{ objectkey.keys(numberOfComment['post_1']).length }} Comments</div>
in angularjs2 project but it is throwing error "cannot read property of undefined objectkey.keys(numberOfComment['post_1']).length
" but it is working in the js (prints in the console).
i tried to implement as mentioned this link Unable to call Object.keys in angularjs
this.objectkey = { keys : Object.keys }
in the js file.
<div>{{ objectkey.keys(numberOfComment['post_1']).length }} Comments</div>
in html