From fff5d4787d20df76350b81fd9cc51bf631bd660a Mon Sep 17 00:00:00 2001 From: adwulfran Date: Wed, 14 Apr 2021 15:07:12 +0200 Subject: [PATCH] remove uselesss line --- app/component.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/component.ts b/app/component.ts index faf1790..64f75bc 100644 --- a/app/component.ts +++ b/app/component.ts @@ -3,13 +3,13 @@ declare module globalThis { } export class Component { - + constructor() { - + } - - render(el:any) { - if (globalThis.routes.findIndex((x:any) => x.path === el['path']) !== -1) { + + render(el: any) { + if (globalThis.routes.findIndex((x: any) => x.path === el['path']) !== -1) { var root = document.getElementById('root'); root.innerHTML = `<` + el['path'] + `>` + el['template'] + ``; var style = document.createElement('style'); @@ -23,13 +23,8 @@ export class Component { nested_comp.innerHTML = el['template']; nested_comp.appendChild(style); var script = document.createElement('script'); - if (el['path'] === 'home-component') { - script.src = "../dist/" + el['path'] + ".ts" - } - else { - script.src = "../dist/" + el['path'] + ".js" - } - nested_comp.appendChild(script) + script.src = "../dist/" + el['path'] + ".js" + nested_comp.appendChild(script); } }