Example 5 - Objects in AngularJS Expression

by taly2808

HTML

<div ng-app ng-init="author={fname:'Ta', lname: 'Ly'}">
    <p>Author's first name: {{author.fname}}</p>
    <p>Author's last name: {{author.lname}}</p>
</div>