Javascript object viewer and editor directive for angular