0.0.1 • Published 4 years ago

agr-join-pipe v0.0.1

Weekly downloads
3
License
-
Repository
-
Last release
4 years ago

AgrJoinPipe

Pipe to show in a string from an array.

Installation

Using npm:

npm install agr-join-pipe

Usage

In module:

// Angular
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

// Modules
import { AppRoutingModule } from './app-routing.module';
import { AgrJoinPipeModule } from 'agr-join-pipe';

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

In your ts:

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-sample-agr-join-pipe',
  templateUrl: './sample-agr-join-pipe.component.html',
  styleUrls: ['./sample-agr-join-pipe.component.css']
})
export class SampleAgrJoinPipeComponent {

  valores: string[];

  constructor() {
    this.valores = [
      "valor1",
      "valor2",
      "valor3",
      "valor4",
      "valor5"
    ]

  }

}

In your html:

{{valores | join}}
0.0.1

4 years ago