0

How can i create empty view ui in vaadin-flow that must be empty header and body.

<html>
 <head>
    <!-- empty -->
 </head>
 <body>
    <!-- empty -->
 </body>
</html>

My created UI has many default tags and scripts inner header and body.

Naranmandakh Tsogoo
  • 221
  • 2
  • 4
  • 10
  • Perhaps I have misunderstood your Question, but… Vaadin Flow is meant for use from the server-side Java API, or alternatively using Vaadin-specific HTML tags, not writing basic HTML. Can you explain more of what you are trying to accomplish, or the goal of your code snippet there? Have you read the [online manual](https://vaadin.com/docs/flow/Overview.html), or watched any [YouTube lectures on Vaadin Flow](https://www.youtube.com/channel/UCsGakFIbOsj-fgPFLf1QlQA) such as [this](https://youtu.be/Un8zKzw6twM) yet? – Basil Bourque Jan 20 '19 at 02:32

1 Answers1

2

Flow will always generate its own internal metadata, initialization logic and so on into the HTML document. Without those, Flow couldn't work.

Flow is not intended to be used in cases where you care about exactly what is in the HTML. This is the trade off you get by using Flow - you give up some low-level control and instead you gain the ability to control what's shown in the browser using a high-level server-side Java API.

The things that are generated there should still not affect what's shown on the screen. You should thus get a blank screen if you define a view class that doesn't add any visible content, e.g.

@Route("empty")
public class EmptyView extends Div {
}
Leif Åstrand
  • 7,820
  • 13
  • 19