Skip to content
This repository was archived by the owner on Feb 17, 2024. It is now read-only.

Commit 4901f78

Browse files
author
Mike Moss
authored
Merge pull request #19 from AngularClass/fix/functions
Update
2 parents 51c25f8 + 14d4b87 commit 4901f78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/ui-example.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class UIExampleComponent implements OnDestroy {
7070

7171
@ViewChild('uiGuideExample', {read: ViewContainerRef})
7272
public exampleConatiner: ViewContainerRef
73-
73+
7474
constructor(
7575
private sandboxService: UIGuideSandboxService,
7676
private uiGuideService: UIGuideSerivce,
@@ -94,12 +94,12 @@ export class UIExampleComponent implements OnDestroy {
9494
const {factory, injector} = this.sandboxService.compilerUIGuide(example.id, this.injector)
9595
this.ref = this.exampleConatiner.createComponent(factory, 0, injector, [])
9696
}
97-
97+
9898
generateClassCode(context: any) {
9999
const contextString = Object.keys(context).reduce((final, next) => {
100100
let value = context[next]
101101
if (value) {
102-
value = JSON.stringify(value)
102+
value = value.toString()
103103
}
104104
return final += ` ${next} = ${value}\n`
105105
}, '\n')
@@ -110,7 +110,7 @@ export class UIExampleComponent implements OnDestroy {
110110
generateTemplateCode(template: string) {
111111
const templateList = template.split('\n')
112112
const baseSpaceCount = templateList[0].search(/\S/)
113-
113+
114114
const formattedTemplate = templateList.reduce((final, next) => {
115115
const spaces = next.search(/\S/)
116116
const diff = baseSpaceCount - spaces

0 commit comments

Comments
 (0)