Shubhankar Dubey

I am a learner and used to learn new things day by day. I have knowledge of various things. I have a great knowledgs of node.js. I have also learn php & their MVC frameworks. I also have the knowledge about wordpress.

Custom Validations in Angular Forms

We often are going to want to write our own custom validations. To see how validators are implemented, let’s look at Validators.required from the Angular core source: export class Validators { static required(c: FormControl): StringMap<string, boolean> { return isBlank(c.value) || c.value == “” ? {“required”: true} : null; } A validator: – Takes a FormControl as its …

Custom Validations in Angular Forms Read More »

Providing Dependencies with NgModule in Angular

While it’s interesting to see how an injector is created directly, that isn’t the typical way we’d use injections. Instead, what we’d normally do is 1) use NgModule to register what we’ll inject – these are called providers 2) use decorators (generally on a constructor) to specify what we’re injecting By doing these two steps Angular …

Providing Dependencies with NgModule in Angular Read More »