Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
.vscode
app
hooks
typings
.gitattributes
.gitignore
README.md
package.json
references.d.ts
tsconfig.json
tsd.json

README.md

#NativeScript implementation with Angular 2

Visit the NativeScript page on the PropertyCross website for screenshots.

##Introduction

NativeScript is a framework for building native iOS and Android apps using JavaScript and CSS. NativeScript renders UIs with the native platform’s rendering engine, resulting in native-like performance and UX. When an app is build, the NativeScript runtime translates the non-platform specific code to the native language of the target platform. Using the NativeScript/Angular2 bridge the features of NativeScript and Angular2 can be combined to write Angular2 components for mobile platforms.

##Building the Application

Install your native toolchain and NativeScript as described in the docs:

https://docs.nativescript.org/setup/quick-setup

Then install the needed NPM packages:

$ npm install

###Add your chosen platform

$ tns platform add android
$ tns platform add ios

###Run in emulator

$ tns run android --emulator
$ tns run ios --emulator

##Application Structure

  • package.json
  • \app
    • app.css - the styles for the application.
    • config.ts
    • main.ts - the application boot strap and global dependency injection.
    • property-cross.ts - the main application class, setting up the routing.
    • \App_Resources - icons used by the app,
    • \components - the Angular 2 components of the application. One component per page.
    • \models - the model layer of the application.
    • \pipes - a pipe for very simple currency formatting as the Angular 2 pipes are not working with NativeScript currently.
    • \services - two services, one to handle the communication to the Nestoria APIs and one to persist the recent searches.
    • \views - the NativeScript XML views used by the components.

##Further Reading