Created
February 1, 2018 07:00
-
-
Save buildmotion/b5c8a834acbd18f766925b9e2829b8d7 to your computer and use it in GitHub Desktop.
App.PostComponent.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit } from '@angular/core'; | |
import { ComponentBase } from 'buildmotion-core'; | |
import { Router } from '@angular/router'; | |
import { LoggingService, Severity } from 'buildmotion-logging'; | |
@Component({ | |
selector: 'app-post', | |
templateUrl: './post.component.html', | |
styleUrls: ['./post.component.css'] | |
}) | |
export class PostComponent extends ComponentBase implements OnInit { | |
postContent: string; | |
constructor( | |
router: Router, | |
loggingService: LoggingService, | |
public formBuilder: FormBuilder, | |
) { | |
super('PostComponent', loggingService, router); | |
} | |
ngOnInit() { | |
// simulate retrieval of content from data store; | |
this.postContent = `hello editor from post component`; | |
} | |
onMarkdownChange(markdown: string) { | |
this.postContent = markdown; | |
console.log(`markdown: ${this.postContent}`); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment