Apply manual fixes to angular-tld.js to support our use-case

This commit is contained in:
Johannes Zellner
2017-02-09 17:25:37 +01:00
parent 92ede4c242
commit 586e78dfea
+5 -1
View File
@@ -1,10 +1,14 @@
// !!!
// This module is manually patched by us to not only report valid domains, but verify that subdomains are not accepted
// !!!
angular.module('ngTld', [])
.factory('ngTld', ngTld)
.directive('checkTld', checkTld);
function ngTld() {
var tldExists = function($path) {
return tld.tldExists($path.$viewValue);
return $path.$viewValue === tld.getDomain($path.$viewValue);
}
return {