Skip to content

Commit d5a2827

Browse files
committed
chore: cleanup
1 parent 3cb5ef5 commit d5a2827

File tree

3 files changed

+1
-56
lines changed

3 files changed

+1
-56
lines changed
Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
/*
2-
In NativeScript, the app.ts file is the entry point to your application.
3-
You can use this file to perform app-level initialization, but the primary
4-
purpose of the file is to pass control to the app’s first module.
5-
*/
6-
71
import { Application } from "@nativescript/core";
82

9-
Application.run({ moduleName: "app-root" });
10-
11-
/*
12-
Do not place any code after the application has been started as it will not
13-
be executed on iOS.
14-
*/
3+
Application.run({ moduleName: "app-root" });
Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,7 @@
1-
/*
2-
In NativeScript, a file with the same name as an XML file is known as
3-
a code-behind file. The code-behind is a great place to place your view
4-
logic, and to set up your page’s data binding.
5-
*/
6-
71
import { EventData, Page } from '@nativescript/core';
82
import { HelloWorldModel } from "./main-view-model";
93

10-
// Event handler for Page "navigatingTo" event attached in main-page.xml
114
export function navigatingTo(args: EventData) {
12-
/*
13-
This gets a reference this page’s <Page> UI component. You can
14-
view the API reference of the Page to see what’s available at
15-
https://docs.nativescript.org/api-reference/classes/_ui_page_.page.html
16-
*/
175
const page = <Page>args.object;
18-
19-
/*
20-
A page’s bindingContext is an object that should be used to perform
21-
data binding between XML markup and TypeScript code. Properties
22-
on the bindingContext can be accessed using the {{ }} syntax in XML.
23-
In this example, the {{ message }} and {{ onTap }} bindings are resolved
24-
against the object returned by createViewModel().
25-
26-
You can learn more about data binding in NativeScript at
27-
https://docs.nativescript.org/core-concepts/data-binding.
28-
*/
296
page.bindingContext = new HelloWorldModel();
307
}

packages/nx/src/generators/application/files_vanilla/src/main-page.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,8 @@
1-
<!--
2-
The markup in NativeScript apps contains a series of user interface components, each
3-
of which NativeScript renders with a platform-specific iOS or Android native control.
4-
You can find a full list of user interface components you can use in your app at
5-
https://docs.nativescript.org/ui/components.
6-
-->
71
<Page xmlns="http://schemas.nativescript.org/tns.xsd" navigatingTo="navigatingTo" class="page">
8-
<!--
9-
The ActionBar is the NativeScript common abstraction over the Android ActionBar and iOS NavigationBar.
10-
http://docs.nativescript.org/ui/action-bar
11-
-->
122
<Page.actionBar>
133
<ActionBar title="My App" icon="" class="action-bar">
144
</ActionBar>
155
</Page.actionBar>
16-
<!--
17-
The StackLayout stacks UI components on the screen—either vertically or horizontally.
18-
In this case, the StackLayout does vertical stacking; you can change the stacking to
19-
horizontal by applying a orientation="horizontal" attribute to the <StackLayout> element.
20-
You can learn more about NativeScript layouts at
21-
https://docs.nativescript.org/ui/layout-containers.
22-
23-
These components make use of several CSS class names that are part of the NativeScript
24-
core theme, such as p-20, btn, h2, and text-center. You can view a full list of the
25-
class names available for styling your app at https://docs.nativescript.org/ui/theme.
26-
-->
276
<StackLayout class="p-20">
287
<Label text="Tap the button" class="h1 text-center"/>
298
<Button text="TAP" tap="{{ onTap }}" class="btn btn-primary btn-active"/>

0 commit comments

Comments
 (0)