Skip to main content

Posts

Showing posts with the label Directive

Password and Confirm Password validation in AngularJs Example

The following example will work to verify the confirm password using compareTo directive. Example:  HTML Code -     < form class ="form-horizontal" role ="form" name ="CreateEmployeeForm" novalidate >         < div class ="col-sm-6 col-sm-offset-3">             < div class ="row">                                 < div class ="form-group">                     < div class ="col-sm-12">                         < span class ="smoothy"> Password </ span >  ...

Angular 5 generate Component, Directive, Pipe, Service, Class and Module - Angular CLI

Angular CLI - Angular 5 generate Component, Directive, Pipe, Service, Class and Module How To Create a new Pipe in Angular 5 using Angular CLI? Here “D:\Angular\my-app>” is my Angular application  Project Directory  and the “CardPipe” is the name of Pipe. The executed Command looks like - D :\ Angular \ my - app > ng g pipe CardPipe   create src / app / card - pipe . pipe . spec . ts ( 196 bytes )   create src / app / card - pipe . pipe . ts ( 205 bytes )   update src / app / app . module . ts ( 653 bytes ) Example – import { Pipe , PipeTransform } from '@angular/core' ; @ Pipe ({   name: 'cardPipe' }) export class CardPipePipe implements PipeTransform {   transform ( value : any , args ?: any ): any {     return "****-****-****" ;   } } How To Create a new component in Angular 5 using Angular CLI? Here “D:\Angular\my-app>” is my Angular applicat...