项目作者: kedar9444

项目描述 :
Gist RunKit combines the power of Github Gist with RunKit.
高级语言: TypeScript
项目地址: git://github.com/kedar9444/Angular-Gist-RunKit.git
创建时间: 2018-10-03T15:19:34Z
项目社区:https://github.com/kedar9444/Angular-Gist-RunKit

开源协议:

下载






Angular Gist RunKit



Gist RunKit combines the power of Github Gist with RunKit.


Source Code

Install

Install the package.

  1. $ npm i -s ngx-gist-runkit

Add the RunKit embed library to your index page:

src/index.html

  1. <head>
  2. ...
  3. <script src="https://embed.runkit.com"></script>
  4. ...
  5. </head>

Whitelist angular-runkit in your System.js config:

src/systemjs.config.js (if applicable)

  1. map: {
  2. ...
  3. 'angular-runkit': 'npm:angular-runkit/dist/index.js',
  4. ...
  5. }

Declare the component in your module:

src/app/app.module.ts

  1. import { NgxGistRunkitModule } from 'ngx-gist-runkit'
  2. ...
  3. @NgModule({
  4. ...
  5. imports: [
  6. ...
  7. NgxGistRunkitModule,
  8. ...
  9. ],
  10. ...
  11. })

Usage

  1. <app-ngx-gist-runkit [gistId]="gistId" [gistFileName]="gistFileName" ></app-ngx-gist-runkit>

Don’t forget to check out the RunKit embed docs.

Inputs

source : string

Basically there are two inputs one is [gistId] and second is [gistFileName].

[gistId] : is the id present after you username when you open your gist on github.

[gistFileName] : Before creating any Gist github asks for the filename you have to enter the same.

Please check below image for more details.

  1. <app-ngx-gist-runkit [gistId]="gistId" [gistFileName]="gistFileName" ></app-ngx-gist-runkit>