example code for angular js