1.0.4 • Published 6 years ago

ras-tiles v1.0.4

Weekly downloads
11
License
ISC
Repository
github
Last release
6 years ago

Tile

This library was generated with Angular CLI version 8.2.0.

Installation and Usage

ES6 via npm

npm i ras-tiles

In Angular module import

In angular app import in module like below

import { TileModule } from 'ras-tiles';

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

Angular component

Usage in Component

import { Tile } from 'ras-tiles/lib/tile.model';


 tilesData: Tile[] = [
    {
      id: 'test1',
      title: 'Test1',
      infos: [
        {
          count: 10,
          info: 'Total'
        },
        {
          count: 1,
          info: 'Inactive'
        },
        {
          count: 2,
          info: 'Deleted'
        }
      ]
    },
    {
      id: 'test2',
      title: 'Test2',
      infos: [
        {
          count: 10,
          info: 'Total'
        }
      ]
    }
    ];


    tileClicked(id) {

    console.log(id);

  }

Template

<ras-tiles [tilesData]="tilesData" (tileClick)="tileClicked($event)"></ras-tiles>

Result

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago