flag-pipe
TypeScript icon, indicating that this package has built-in type declarations

1.5.0 • Public • Published

ng-Flag Pipe

[ Component In-progress ]

Flag Pipe : is an Angular library

that provides a pipe to [src] attribute on <img> to dynamically import flag image path.

Getting Started

Dependencies

  • Angular 11.2.0 -> latest version

Installing

import { FlagPipeModule } from "flag-pipe";
@NgModule({
  imports: [
	flagPipeModule.forRoot({
		config: {
			flagExtensions: "png",
			flagType: "FIXED_HEIGHT",
			flagSize: "h20",
		},
	}),
  ]
})

Usage :



Full Example :
<img [src]="'qa' | flag : 'svg' : WAVY : 'w160'" />

Future Plans

  • [ In-Progress ] Create a component to use it as <flag> tag.
  • [ ] Add more features to the component.
  • [ ] CI/CD with Github Actions.

Acknowledgments

Inspirations.

Contributions

This project is an easy and simple project to contribute to. Feel free to open issues and pull requests.

Package Sidebar

Install

npm i flag-pipe

Weekly Downloads

1

Version

1.5.0

License

MIT

Unpacked Size

54.6 kB

Total Files

28

Last publish

Collaborators

  • mahmoud_ibrahim