npm.io
1.5.0 • Published 2 years ago

flag-pipe

Licence
MIT
Version
1.5.0
Deps
1
Size
53 kB
Vulns
0
Weekly
0

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.

Keywords