|
@@ -1,8 +1,9 @@
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { Component, OnInit } from '@angular/core';
|
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
|
|
+import { ActivatedRoute } from '@angular/router';
|
|
import { Transformer, builtInPlugins } from 'markmap-lib';
|
|
import { Transformer, builtInPlugins } from 'markmap-lib';
|
|
import { fillTemplate } from 'markmap-render';
|
|
import { fillTemplate } from 'markmap-render';
|
|
-
|
|
|
|
|
|
+import Parse from "parse";
|
|
@Component({
|
|
@Component({
|
|
selector: 'app-skill-tree',
|
|
selector: 'app-skill-tree',
|
|
templateUrl: './skill-tree.page.html',
|
|
templateUrl: './skill-tree.page.html',
|
|
@@ -11,14 +12,25 @@ import { fillTemplate } from 'markmap-render';
|
|
export class SkillTreePage implements OnInit {
|
|
export class SkillTreePage implements OnInit {
|
|
clickedText:any
|
|
clickedText:any
|
|
constructor(
|
|
constructor(
|
|
- private domSan:DomSanitizer
|
|
|
|
|
|
+ private domSan:DomSanitizer,
|
|
|
|
+ private route:ActivatedRoute,
|
|
) {
|
|
) {
|
|
this.clickedText = localStorage.getItem('clickedText')
|
|
this.clickedText = localStorage.getItem('clickedText')
|
|
console.log(this.clickedText)
|
|
console.log(this.clickedText)
|
|
}
|
|
}
|
|
|
|
|
|
- ngOnInit() {
|
|
|
|
- this.jobSkillHtml = this.domSan.bypassSecurityTrustHtml(this.renderMarkMind(this.jobSkillMarkdown))
|
|
|
|
|
|
+ boleJob:Parse.Object|undefined
|
|
|
|
+ async ngOnInit() {
|
|
|
|
+ let id = this.route.snapshot.paramMap.get("id")
|
|
|
|
+ if(id){
|
|
|
|
+ let query = new Parse.Query("BoleJob");
|
|
|
|
+ let job = await query.get(id)
|
|
|
|
+ this.boleJob = job
|
|
|
|
+ let markmind = job.get("markmind")
|
|
|
|
+ if(markmind){
|
|
|
|
+ this.jobSkillHtml = this.domSan.bypassSecurityTrustHtml(this.renderMarkMind(markmind))
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
renderMarkMind(markdown:string){
|
|
renderMarkMind(markdown:string){
|