npm install angular-runkitAngular RunKit Component.
Install the package.
``sh`
$ npm i -S angular-runkit
Add the RunKit embed library to your index page:
src/index.html
`html`
...
...
Whitelist angular-runkit in your System.js config:
src/systemjs.config.js
`js`
map: {
...
'angular-runkit': 'npm:angular-runkit/dist/index.js',
...
}
Declare the component in your module:
src/app/app.module.ts
`ts
import { RunKitEmbedComponent } from 'angular-runkit'
...
@NgModule({
...
declarations: [
...
RunKitEmbedComponent,
...
],
...
})
`
`html`

Don't forget to check out the RunKit embed docs.
Specify the source code that the notebook will use.
`html`
If true, the user will not be able to edit or run the embed.
`html`
readOnly=true>
If 'endpoint', the notebook will be run as an endpoint and a link to the served page will be shown.
`html`
mode='endpoint'>
Request a version or semver range for the node engine.
`html`
nodeVersion='7'>
Provide a list of environment variables accessible in the notebook through process.env.
`htmlHello, ${ process.env.FIRST_NAME } ${ process.env.LAST_NAME }!)'`
[env]='["FIRST_NAME=Haskell", "LAST_NAME=Curry"]'
nodeVersion='7'>
Provide a title for the notebook when opened on RunKit.
`html`
title='Hello'>
Provide a minimum height for the embed ('130px' by default).
`html`
minHeight='200px'>
Specify the Unix time in milliseconds at which packages should resolved. Packages published after the date will be ignored.
`html`
packageTimestamp=1468195200000>
Specify source code that is run before the main source. This code will not be shown in the embed.
`html`
preamble='const _ = require("lodash/fp")'>
Provide a callback that is run when the embed is loaded.
`js`
(onLoad)='loaded()'>
Provide a callback that is run whenever the embed's URL changes.
`js`
(onURLChanged)='urlChanged()'>
Provide a callback that is run whenever the embed is evaluated.
`js`
(onEvaluate)='evaluated()'>
Evaluate the notebook.
`html``
source='console.log("Hello, world!")'>