import { Component , OnInit } from "@angular/core" ; import { Page , StackLayout } from "@nativescript/core" ; @ Component ( { moduleId : module . id , templateUrl : "./apply-style-code.component.html" } ) export class ApplyStyleCodeComponent implements OnInit { constructor ( private page ) { } ngOnInit ( ) { this . page . css = "#labelStyle{ background-color: #564448; color: white} button {font-size: 36; color: blue;}" + " .message {font-size: 36; color: #284848; text-align: center; margin: 0 20;}" ; } public counter : number = 16 ; public get message ( ) : string { if ( this . counter > 0 ) { return this . counter + " taps left" ; } else { return "Hoorraaay! \nYou are ready to start building!" ; } } public onTap ( ) { this . counter -- ; } }