मैं एक स्थिर विधि के अंदर से अपने कस्टम http सेवा का उपयोग करने की जरूरत है एक कस्टम सत्यापनकर्ता से एक सेवा एक्सेस, उदाहरण के रूप में:Angular2
import {Control} from 'angular2/common';
import {HttpService} from './http.service';
class UsernameValidator {
static usernameExist(control: Control): Promise<ValidationResult> {
... /* Access my HTTPservice here */
}
}
मैं कैसे इस मामले में एक सेवा का उपयोग कर सकते हैं?
आप अपने कोड के अधिक स्निपेट यहीं कर सकते हैं? – micronyks
HTTPService क्या है? इसके स्निपेट रखो। – micronyks