//This file was created for future attempts to migrate to Angular 1.6, 1.7, or later
/**
 * @brief Shim for old AngularJs 1.x extensions in order to make them compatible with the latest 
 *   version of angularjs
 */

function lowercase(string) {
  return (typeof string === 'string') ? string.toLowerCase() : string;
}

//$http.success was deprecated in Angular 1.5 but was officially removed in 1.6.
//  User.create(vm.userData).success in userRegistrationController.js needs to change to User.create(vm.userData).then
// This may or may not cause unwanted behavior, further testing is required.

// Angular deprecated the lowercase function as of v1.6.7. 
// TextAngular uses this function, but was replaced with the fork TextAngularJs which supports later versions of AngularJs
// However, there still exists packages that have not been updated.
angular.lowercase = lowercase;

//Angular 1.6.x appends a "!" to routes by default.
//EX: /#/home -> /#!/home
//The following link and youtube video describes how to revert back to the previous behavior
//https://stackoverflow.com/questions/41211875/angularjs-1-6-0-latest-now-routes-not-working
//https://www.youtube.com/watch?v=66l-IF1Vfk0

//Project Proposal submission breaks when using angular 1.6 or later. 


