AngularJS reference architecture