Learning proper way to implement Angular and Rails