Socket
Book a DemoInstallSign in
Socket

ngx-isotope2

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-isotope2

[![npm version](https://badge.fury.io/js/angular2-isotope.svg)](https://www.npmjs.com/package/ngx-isotope2)

0.0.5
latest
Source
npmnpm
Version published
Weekly downloads
5
150%
Maintainers
1
Weekly downloads
 
Created
Source

Isotope module for Angular 7

npm version

ngx-isotope is in development and not ready for production use. Feel free to install and try it out, but depend on it at your own risk.

Table of contents

Getting Started

Installation instructions

To install this library, run:

$ npm install ngx-isotope2 --save

If you're using angular-cli add isotope-layout, masonry-layout and imagesloaded to your file configuration angular.json:

"scripts": [
  "../node_modules/masonry-layout/dist/masonry.pkgd.min.js",
  "../node_modules/isotope-layout/dist/isotope.pkgd.min.js",
  "../node_modules/imagesloaded/imagesloaded.pkgd.js"
]

Consuming the library

Import NgxIsotope2Module from your Angular AppModule:

import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';

// Import the library
import { NgxIsotope2Module } from 'ngx-isotope2';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    NgxIsotope2Module
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its components, directives and pipes in your Angular application:

 @Component({
   selector: 'my-component',
   template: `
     <isotope-grid>
       <isotope-item *ngFor="let item of items">{{item.name}}</isotope-item>
     </isotope>
 })
 class MyComponent {
   items = [
     {name: 'Item 1'},
     {name: 'Item 2'},
     {name: 'Item 3'},
     {name: 'Item 4'},
     {name: 'Item 5'},
   ]
 }

Configuration

Options

Read about Isotope options here: https://isotope.metafizzy.co/options.html

The options attribute takes an object with the following properties:

  • itemSelector: string;
  • layoutMode: LayoutModes;
  • percentPosition: boolean;
  • stamp: string;

Examples

Inline object:

<isotope-grid [options]="{ itemSelector: '.grid-item' }"></isotope-grid>

From parent component:

import { IsotopeOptions } from 'ngx-isotope';

public myOptions: IsotopeOptions = {
  itemSelector: '.grid-item'
};
<isotope-grid [options]="myOptions"></isotope-grid>

Developers

Mayank Patel

License

MIT ©

Keywords

angular

FAQs

Package last updated on 30 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.