Cleaning up angular, preparing to make new editor framework for coursewares

This commit is contained in:
Nathan Leniz
2015-02-02 20:39:05 -05:00
parent f059bc33d8
commit a558777382
3 changed files with 235 additions and 3 deletions

View File

@@ -158,7 +158,7 @@ profileValidation.directive('uniqueUsername', function($http) {
}
}
});
// TODO: FIX THIS
profileValidation.directive('existingUsername', function($http) {
return {
restrict: 'A',
@@ -171,7 +171,7 @@ profileValidation.directive('existingUsername', function($http) {
ngModel.$setPristine();
}
if (element.val()) {
$http.get("/api/checkExistingUsername/" + element.val() + ' ').success(function (data) {
$http.get("/api/checkExistingUsername/" + element.val()).success(function (data) {
if (element.val() == scope.existingUsername) {
ngModel.$setValidity('exists', false);
} else if (data) {