location of various code trying different methods and components in AngularJS