0.0.5 • Published 9 months ago

@genifrtab/iframe-table v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

IframeTable

This library was generated with Angular CLI version 16.1.0.

This package allows you to automatically create iframe videos and show them on the screen according to the number of columns and change their style.

Installation

npm i @genifrtab/iframe-table

Code scaffolding

Run ng generate component component-name --project iframe-table to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module --project iframe-table.

Note: Don't forget to add --project iframe-table or else it will be added to the default project in your angular.json file.

Build

Run ng build iframe-table to build the project. The build artifacts will be stored in the dist/ directory.

Publishing

After building your library with ng build iframe-table, go to the dist folder cd dist/iframe-table and run npm publish.

Running unit tests

Run ng test iframe-table to execute the unit tests via Karma.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.

Use

''' Import

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

''' ---- html

  <!--@Input() videoList: VideoModel[] = [];
  @Input() width:number = 560;
  @Input() height:number = 315;
  @Input() backgroundColor: string ="white";
  @Input() titleColor: string ="black";
  @Input() textColor: string = "black";
  @Input() row_col :string ="col-md-4"; -->

  <iframe-table [videoList]="videoList" [row_col]="'col-md-4'" [width]="?" [height]="?" [backgroundColor]="?" [titleColor]="?" [textColor]="?" ></iframe-table>

---Component

    import { Component } from '@angular/core';
    import { VideoModel } from 'iframe-table';

    @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.scss']
    })
    export class AppComponent {
    title = 'angularProject';

    videoList: VideoModel[] = [
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4',title:"title1",description:"description1" },
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4',title:"title2",description:"description2" },
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4' ,title:"title3",description:"description3"},
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4' ,title:"title4",description:"description4"},
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4' ,title:"title5",description:"description5"},
        { url: 'https://www.youtube.com/embed/5w6n_a32WE4' ,title:"title6",description:"description6"}
    
    ];
    }