ng-medium
TypeScript icon, indicating that this package has built-in type declarations

0.0.6 • Public • Published

NgMedium

NPM version

Angular component to show articles form Medium blog feed. This is useful in case you would like to embed your stories in your website.

Installation:

npm install ng-medium

Use Example:

Add new import to your @NgModule:

import {NgMediumModule} from 'ng-medium';
 
...
 
@NgModule({
  imports: [
    NgMediumModule
  ]
})

Use directly inside your HTML templates by adding the tag ng-medium-feed.

<ng-medium-feed
  feedUrl="https://medium.com/feed/tag/typescript"
></ng-medium-feed>

Styling

The whole purpose of this project is to get the feed look native in your website. This means there needs to be a way to provide whatever styling you want. For this purpose there is styles input on the component.

The input accepts an object of NgMediumStyles.

<ng-medium-feed
  feedUrl="https://medium.com/feed/tag/typescript"
  styles="{'feedContainer': {'background': 'red'}}"
>
</ng-medium-feed>

The more complex example can be seen in demo

Default Values

Please note that all the not-provided sections get a default styling. That lives in NgMediumFeedComponent

Contributing

All the help is welcome!

Build

To build library run in root folder:

ng build ng-medium

After that ng serve demo will use the version you just build.

Package

The library is being packaged and sent to npm. Following steps are needed:

npm run-script packLib
npm login # unless you haven't done that 
npm run-script publishLib

/ng-medium/

    Package Sidebar

    Install

    npm i ng-medium

    Weekly Downloads

    0

    Version

    0.0.6

    License

    none

    Unpacked Size

    153 kB

    Total Files

    39

    Last publish

    Collaborators

    • pavel.schoffer