0.0.4 • Published 1 year ago

ngx-remove-in-range v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

NgxRemoveInRange

A Directive to entirely remove elements from the dom in specific screen width ranges.

Installation

  npm i ngx-remove-in-range
  # or
  yarn add ngx-remove-in-range

Usage/Examples

TS

import { RemoveInRangeDirective } from "ngx-remove-in-range"

@Component({
  selector: "app-home",
  standalone: true,
  imports: [CommonModule, RemoveInRangeDirective],
  templateUrl: "./home.component.html",
  styleUrl: "./home.component.scss"
})
export class HomeComponent {}

HTML

<!-- Remove starting from 300px up to 600px -->
<h1 *removeInRange="[[300, 600]]">Ahmed</h1>

<!-- Remove starting from 300px -->
<h1 *removeInRange="[[300]]">Ahmed</h1>

<!-- Remove starting from 300px up to 600px and starting from 800px up to 1000px -->
<!-- Visible between 600px and 800px -->
<h1 *removeInRange="[[300, 600], [800, 1000]]">Ahmed</h1>

Author

@AhmedHassan

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago