I want to download the text file by clicking on button, everything is working fine as expected. But the problem is the data I want to insert in text file is just one line.
String fileContent = “Simple Solution nDownload Example 1”; here, n is not working. It resulting in output as:
Simple Solution Download Example 1
interface implementation in my service class:
Don’t use hardcoded
rn – line-separators are platform-specific (Windows differs to all other OS).
What you can do is:
- Build content with