How to Insert a Line Break Using a FormattedString in NativeScript Tutorial


Whether you’re using NativeScript Core, NativeScript Vue, or NativeScript Angular, some core widget tricks are the same, including using a FormattedString to separate out the sections of text in your Labels and Buttons. In this really short NativeScript Tutorial, I show you how to use a FormattedString, but also how to insert a newline (aka line break) in that string.

Share this video with a friend to help them with their native JavaScript apps:

Share the entire NativeScript playlist to help your friends with their native iOS and Android apps written with JavaScript:

If you have a topic you want me to make a video about use #iscriptnative in the comments.

Alex on Twitter:
NativeScripting on Twitter:


Take 25% off any premium NativeScript course by using the coupon code YOUTUBE


Xem Thêm Bài Viết Khác:


  1. Hi i have a question how to create a bottom sheet that can be slide up and down. Like how google uses bottom sheet in google maps that reveal more information when slide up

  2. Hi Alex, I loved your tutorials. Thank you for your sharings. I have a question for you, if you interest 😉
    Im trying to make a gradient over an image from left to right alpha zero to one.
    html: <Image src="res://logo" class="imgGrad"></Image>
    css: .imgGrad{
    linear-gradient(to left, rgba(255,255,255,0),rgba(255,255,255,1));

    this code works with ios, but not in android. Android cant make that gradient. Shows only image.

  3. one of my favorite uses for FormattedString is when I want to apply different class name for different parts of the text on the same label.

  4. Second. 🙂 Hi Alexandr, I have a question. How can you create a vertical timeline with hours separated by vertical line with circles on each hour for events. And second how to make a day view calendar on top of the screen. Thanks a lot in advance. Aleksandrs from Lavia, thank you for you videos.


Please enter your comment!
Please enter your name here