diff --git a/.gitignore b/.gitignore index 64f6d41..db69d26 100644 --- a/.gitignore +++ b/.gitignore @@ -28,9 +28,11 @@ testem.log .DS_Store Thumbs.db +nativescript/app/**/*.css nativescript/app/app nativescript/hooks nativescript/node_modules nativescript/platforms +src/app/**/*.css src/app/**/*.js src/app/**/*.js.map diff --git a/nativescript/app/app.css b/nativescript/app/app.css deleted file mode 100644 index 06d6dc1..0000000 --- a/nativescript/app/app.css +++ /dev/null @@ -1,19 +0,0 @@ -button, label, stack-layout { - horizontal-align: center; -} - -button { - font-size: 36; -} - -.title { - font-size: 30; - margin: 20; -} - -.message { - font-size: 20; - color: #284848; - text-align: center; - margin: 0 20; -} diff --git a/nativescript/app/app.scss b/nativescript/app/app.scss new file mode 100644 index 0000000..92c3593 --- /dev/null +++ b/nativescript/app/app.scss @@ -0,0 +1,42 @@ +/*button, label, stack-layout { + horizontal-align: center; +} + +button { + font-size: 36; +} + +.title { + font-size: 30; + margin: 20; +} + +.message { + font-size: 20; + color: #284848; + text-align: center; + margin: 0 20; +} */ + +ActionBar { + background-color: #4E75E2; + color:#fff; +} + +ListView { + max-width: 320px; + margin: 0 auto; + display: block; + + StackLayout { + padding:5 0 0 10; + text-align:left; + + &.even { + background-color: #efefef; + Label { + + } + } + } +} diff --git a/nativescript/app/jamiroquai1.jpg b/nativescript/app/jamiroquai1.jpg new file mode 100644 index 0000000..3da8392 Binary files /dev/null and b/nativescript/app/jamiroquai1.jpg differ diff --git a/nativescript/app/jamiroquai2.jpg b/nativescript/app/jamiroquai2.jpg new file mode 100644 index 0000000..9e9be8c Binary files /dev/null and b/nativescript/app/jamiroquai2.jpg differ diff --git a/nativescript/package.json b/nativescript/package.json index 470c1d0..a82a53c 100644 --- a/nativescript/package.json +++ b/nativescript/package.json @@ -1,39 +1,39 @@ { - "description": "NativeScript Application", - "license": "SEE LICENSE IN ", - "readme": "NativeScript Application", - "repository": "", - "nativescript": { - "id": "org.nativescript.nativescript", - "tns-ios": { - "version": "2.0.1" + "description": "NativeScript Application", + "license": "SEE LICENSE IN ", + "readme": "NativeScript Application", + "repository": "", + "nativescript": { + "id": "org.nativescript.nativescript", + "tns-ios": { + "version": "2.0.0" + }, + "tns-android": { + "version": "2.0.0" + } }, - "tns-android": { - "version": "2.0.0" + "dependencies": { + "@angular/common": "2.0.0-rc.1", + "@angular/compiler": "2.0.0-rc.1", + "@angular/core": "2.0.0-rc.1", + "@angular/http": "2.0.0-rc.1", + "@angular/platform-browser": "2.0.0-rc.1", + "@angular/platform-browser-dynamic": "2.0.0-rc.1", + "@angular/platform-server": "2.0.0-rc.1", + "@angular/router": "2.0.0-rc.1", + "@angular/router-deprecated": "2.0.0-rc.1", + "nativescript-angular": "0.1.6", + "nativescript-ng2-magic": "^1.5.7", + "tns-core-modules": "^2.0.0" + }, + "devDependencies": { + "babel-traverse": "6.9.0", + "babel-types": "6.9.0", + "babylon": "6.8.0", + "filewalker": "0.1.2", + "lazy": "1.0.11", + "nativescript-dev-sass": "^0.1.0", + "nativescript-dev-typescript": "^0.3.2", + "typescript": "^1.8.10" } - }, - "dependencies": { - "@angular/common": "2.0.0-rc.1", - "@angular/compiler": "2.0.0-rc.1", - "@angular/core": "2.0.0-rc.1", - "@angular/http": "2.0.0-rc.1", - "@angular/platform-browser": "2.0.0-rc.1", - "@angular/platform-browser-dynamic": "2.0.0-rc.1", - "@angular/platform-server": "2.0.0-rc.1", - "@angular/router": "2.0.0-rc.1", - "@angular/router-deprecated": "2.0.0-rc.1", - "nativescript-angular": "0.1.1", - "nativescript-ng2-magic": "^1.5.7", - "tns-core-modules": "^2.0.0" - }, - "devDependencies": { - "babel-traverse": "6.9.0", - "babel-types": "6.9.0", - "babylon": "6.8.0", - "filewalker": "0.1.2", - "lazy": "1.0.11", - "nativescript-dev-sass": "^0.1.0", - "nativescript-dev-typescript": "^0.3.2", - "typescript": "^1.8.10" - } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 372bafc..31df343 100644 --- a/package.json +++ b/package.json @@ -1,54 +1,54 @@ { - "name": "nativescript-angular-web-components", - "version": "0.0.0", - "license": "MIT", - "angular-cli": {}, - "scripts": { - "start": "ng server", - "postinstall": "typings install", - "lint": "tslint \"src/**/*.ts\"", - "format": "clang-format -i -style=file --glob=src/**/*.ts", - "test": "ng test", - "pree2e": "webdriver-manager update", - "e2e": "protractor", - "start.ios": "cd nativescript && tns emulate ios", - "start.livesync.ios": "cd nativescript && tns livesync ios --emulator --watch", - "start.android": "cd nativescript && tns emulate android", - "start.livesync.android": "cd nativescript && tns livesync android --emulator --watch" - }, - "private": true, - "dependencies": { - "@angular/common": "2.0.0-rc.1", - "@angular/compiler": "2.0.0-rc.1", - "@angular/core": "2.0.0-rc.1", - "@angular/http": "2.0.0-rc.1", - "@angular/platform-browser": "2.0.0-rc.1", - "@angular/platform-browser-dynamic": "2.0.0-rc.1", - "@angular/router": "2.0.0-rc.1", - "@angular/router-deprecated": "2.0.0-rc.1", - "es6-shim": "^0.35.0", - "hammerjs": "^2.0.8", - "nativescript-ng2-magic": "^1.5.7", - "reflect-metadata": "0.1.3", - "rxjs": "5.0.0-beta.6", - "systemjs": "0.19.26", - "zone.js": "^0.6.12" - }, - "devDependencies": { - "angular-cli": "^1.0.0-beta.2-mobile.3", - "clang-format": "^1.0.35", - "codelyzer": "0.0.14", - "ember-cli-inject-live-reload": "^1.4.0", - "jasmine-core": "^2.4.1", - "jasmine-spec-reporter": "^2.4.0", - "karma": "^0.13.15", - "karma-chrome-launcher": "^0.2.3", - "karma-jasmine": "^0.3.8", - "node-sass": "^3.7.0", - "protractor": "^3.3.0", - "ts-node": "^0.5.5", - "tslint": "^3.6.0", - "typescript": "^1.8.10", - "typings": "^0.8.1" - } -} + "name": "nativescript-angular-web-components", + "version": "0.0.0", + "license": "MIT", + "angular-cli": {}, + "scripts": { + "start": "ng server", + "postinstall": "typings install", + "lint": "tslint \"src/**/*.ts\"", + "format": "clang-format -i -style=file --glob=src/**/*.ts", + "test": "ng test", + "pree2e": "webdriver-manager update", + "e2e": "protractor", + "start.ios": "cd nativescript && tns emulate ios", + "start.livesync.ios": "cd nativescript && tns livesync ios --emulator --watch", + "start.android": "cd nativescript && tns emulate android", + "start.livesync.android": "cd nativescript && tns livesync android --emulator --watch" + }, + "private": true, + "dependencies": { + "@angular/common": "2.0.0-rc.1", + "@angular/compiler": "2.0.0-rc.1", + "@angular/core": "2.0.0-rc.1", + "@angular/http": "2.0.0-rc.1", + "@angular/platform-browser": "2.0.0-rc.1", + "@angular/platform-browser-dynamic": "2.0.0-rc.1", + "@angular/router": "2.0.0-rc.1", + "@angular/router-deprecated": "2.0.0-rc.1", + "es6-shim": "^0.35.0", + "hammerjs": "^2.0.8", + "nativescript-ng2-magic": "^1.5.7", + "reflect-metadata": "0.1.3", + "rxjs": "5.0.0-beta.6", + "systemjs": "0.19.26", + "zone.js": "^0.6.12" + }, + "devDependencies": { + "angular-cli": "^1.0.0-beta.2-mobile.3", + "clang-format": "^1.0.35", + "codelyzer": "0.0.14", + "ember-cli-inject-live-reload": "^1.4.0", + "jasmine-core": "^2.4.1", + "jasmine-spec-reporter": "^2.4.0", + "karma": "^0.13.15", + "karma-chrome-launcher": "^0.2.3", + "karma-jasmine": "^0.3.8", + "node-sass": "^3.7.0", + "protractor": "^3.3.0", + "ts-node": "^0.5.5", + "tslint": "^3.6.0", + "typescript": "^1.8.10", + "typings": "^0.8.1" + } +} \ No newline at end of file diff --git a/src/app/app.component.html b/src/app/app.component.html index ff41d46..0d0a5df 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -12,10 +12,11 @@ - + diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 24af656..ceef2d9 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -51,21 +51,15 @@ export class AppComponent { } } - public onLoaded(e: any) { - console.log(`onLoaded`); - console.log(e); - } - - public onItemLoading(e: any) { - console.log(`onItemLoading`); - console.log(e); - } - public onItemTap(e: any) { console.log(`onItemTap`); console.log(e); } + public selectUser(user: any) { + console.log(user.name.first + ' ' + user.name.last); + } + private loadUsers() { this.http.get(`https://randomuser.me/api/?results=100&nat=us&seed=${Math.floor(Math.random()*100000000)}`).map(res => res.json()).subscribe((response: any) => { this.users = response.results; diff --git a/src/app/components/list-view/list-view.component.css b/src/app/components/list-view/list-view.component.scss similarity index 100% rename from src/app/components/list-view/list-view.component.css rename to src/app/components/list-view/list-view.component.scss