Closed alexc101 closed 7 years ago
Is there an example on how to attach the service to an input? Been trying to call the service through (input) / (keydown) etc inside a custom directive but not having much luck and can't find anything in the repo which shows how it works.
(https://github.com/born2net/Angular-kitchen-sink/blob/master/src/services/CreditService.ts)
Sorry if this is inappropriate - thanks!
simply import in the constructor: constructor(private cc:CreditService) and call appropriate methods cc.validateCardNumber('4111111111111111')
constructor(private cc:CreditService)
cc.validateCardNumber('4111111111111111')
Is there an example on how to attach the service to an input? Been trying to call the service through (input) / (keydown) etc inside a custom directive but not having much luck and can't find anything in the repo which shows how it works.
(https://github.com/born2net/Angular-kitchen-sink/blob/master/src/services/CreditService.ts)
Sorry if this is inappropriate - thanks!