Setup view for details.   Changed angular to not use global functions and to follow best practices.