This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ISO 3166 Country Code | ISO639-2 Country Code | Country | ISO 3166 Country Code | ISO639-2 Lang | Language | Date Format | |
---|---|---|---|---|---|---|---|
ALB | AL | Albania | sqi | sq | Albanian | yyyy-MM-dd | |
ARE | AE | United Arab Emirates | ara | ar | Arabic | dd/MM/yyyy | |
ARG | AR | Argentina | spa | es | Spanish | dd/MM/yyyy | |
AUS | AU | Australia | eng | en | English | d/MM/yyyy | |
AUT | AT | Austria | deu | de | German | dd.MM.yyyy | |
BEL | BE | Belgium | fra | fr | French | d/MM/yyyy | |
BEL | BE | Belgium | nld | nl | Dutch | d/MM/yyyy | |
BGR | BG | Bulgaria | bul | bg | Bulgarian | yyyy-M-d | |
BHR | BH | Bahrain | ara | ar | Arabic | dd/MM/yyyy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {PipeTransform, Pipe} from 'angular2/core'; | |
@Pipe({ name: 'highlight' }) | |
export class HighLightPipe implements PipeTransform { | |
transform(text: string, [search]): string { | |
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text; | |
} | |
} | |
/** Usage: |