Plunkers angularjs
http://plnkr.co/edit/r9583c5oXJs2ruAPkb0d?p=preview http://plnkr.co/edit/qrDMJBlnwdNlfBqEEXL2?p=preview