Sam Basu
Dev 🥑 for @Telerik. 10x MVP. Speaker. Author. Host of 3 Twitch/YT Shows. Help with @DevReach. ❤️ Family,Travels. 💜 Apple, Audi, Cricket. Foodie. Geek! 🌱🌎
npm install -g nativescript
tns create MyApp / tns create MyApp --ng
tns platform add android
tns run android
tns run android --emulator
<Image source="{thumbnailImageSource}" width="72" height="72"/>
<Label text="{itemTitle}" textWrap="true" cssClass="title" />
<Button text="{authoredBy}“ width="150“ cssClass="author"/>
<Image source="{thumbnailImageSource}"
width="72"
height="72"
verticalAlignment="top"/>
<Label text="{{ num_comments ? num_comments + ' comments' : '' }" />
<Page loaded="load">
<Label text="{{ message }}" />
</Page>
.Label {
color: red;
font-size: 20;
margin: 20;
}
var alert = new UIAlertView();
alert.message = "Hello World";
alert.addButtonWithTitle("OK");
alert.show();
var http = require("http");
http.getJSON("https://api.myservice.com")
.then(function(result){
// result is a JSON object
// do stuff
});
var fileSystem = require("file-system");
new fileSystem.File(somePath);
new java.io.File(somePath);
NSFileManager.defaultManager();
fileManager.createFileAtPathContentsAttributes(somePath);
By Sam Basu