Skip to content

Instantly share code, notes, and snippets.

@gibotsharshita
Created June 20, 2018 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gibotsharshita/011859c09d8ac7c33c8dcc215347ef7c to your computer and use it in GitHub Desktop.
Save gibotsharshita/011859c09d8ac7c33c8dcc215347ef7c to your computer and use it in GitHub Desktop.
import {Component, Input, OnInit} from '@angular/core';
@Component({
selector: 'load-me',
template: `<h3 style="background-color: #00b0e8">
I am a component loaded from a Gist! {{inputText}}</h3>`
})
export class LoadMeComp implements OnInit{
@Input() inputText: string;
constructor() {
}
ngOnInit() {
this.inputText = 'harshita';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment