0.1.0 • Published 4 years ago

@asifisthiaq/ng-ion-tweeter v0.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

NgIonTweeter

post-tweet component

post-tweet gif tweet-card component

tweet-card gif

Installation

npm i @asifisthiaq/ng-ion-tweeter --save

Usage

Import ng-ion-tweeter module in app.module.ts or any other desired module.

import { NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { IonicModule } from "@ionic/angular";
import { NgIonTweeterModule } from "@asifisthiaq/ng-ion-tweeter";
 
@NgModule({
  imports: [ CommonModule, IonicModule, NgIonTweeterModule ]
})

Then, use in desired component.

// app.component.ts
import { Component } from "@angular/core";
import { Tweet } from "@asifisthiaq/ng-ion-tweeter";
@Component({
    selector: 'my-app',
    template: `
    <post-tweet
      [userProfileImage]="userProfileImg"
      (emitOutput)="submitTweetLib($event)"
    ></post-tweet>
    <tweet-card
      [tweets]="tweets"
      (emitOutput)="deleteTweetLib($event)"
    ></tweet-card>`,
}) 

export class MyApp {
    tweets: Tweet[] = [
        {
            "id": 1,
            "user_name": "Incredible Concrete Fish Aisf Library",
            "tweet_body": "Nam iure repudiandae enim quia ab ut reiciendis veniam qui. Fugiat id dolorem corporis occaecati at inventore dicta cupiditate.",
            "user_image_url": "http://placeimg.com/640/480/business"
        },
        {
            "id": 2,
            "user_name": "Tasty Metal Salad Library",
            "tweet_body": "Nulla recusandae sint sed libero odit. Ut est rem iste. Consequatur voluptatem nesciunt hic autem doloribus quis. Tenetur omnis rerum quia. Non voluptatem perferendis accusamus rerum deserunt dolorem id quis.",
            "user_image_url": "http://placeimg.com/640/480/business",
            "tweet_image_url": "https://source.unsplash.com/1600x900/?product"
        }
    ];

    userProfileImg = "user-profile-image-link";

    constructor() {}

    submitTweetLib($event: any): void {
        console.log($event);
        //do neccessary steps for submiting/posting tweet
    }

    deleteTweetLib($event: any) {
        console.log($event);
        //do neccessary steps for deleting a specific tweet. 
    }
}

Creators

Asif Isthiaq
0.0.11

4 years ago

0.1.0

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago