#101286
yavordashew
Member

Hi davout,
When using the ‘smart-window’ component you should set the ‘opened’ property to a boolean value.
If you want the window to be visible you can set the value to ‘true’.
Also the ‘template’ must not be in the ‘smart-window’ tag.You should place the ‘template’ after your <app-root> tag with its corresponding id.
I have made a little code snippet for you with the corrections you need to make.
For your app.component.html file :
<smart-window
label=”{{taskEditService.title}}”
[opened]=”true”
[windowParent]=”‘body'”
[headerButtons]=”[‘close’,’minimize’,’pin’,’collapse’]”
[footerTemplate]=”‘footerTemplate'”
[footerPosition]=”‘bottom'”
(onClose)=”taskEditService.hide()” >
</smart-window>
In your main.html (main.html name is just for example) after the <app-root> tag, like this:
<body>
<app-root>Loading… </app-root>
<template id=”footerTemplate”>
<smart-button class=”flat”>Save</smart-button>
<smart-button class=”flat”>Restore</smart-button>
</template>
</body>
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/