From e63ae36811f6900f9e6b06ac5ccf0004272637fb Mon Sep 17 00:00:00 2001 From: zainmustafa Date: Thu, 5 May 2016 23:44:59 +0500 Subject: [PATCH 1/3] added structure with header, footer and body --- .idea/.name | 1 + .idea/encodings.xml | 6 + .idea/misc.xml | 13 + .idea/modules.xml | 8 + .idea/ng-conf-2016-hackathon-app.iml | 8 + .idea/vcs.xml | 6 + .idea/workspace.xml | 353 +++++++++++++++++++++++++++ npm-debug.log | 40 +++ src/bootstrap.ts | 10 +- src/footer.ts | 17 ++ src/header.ts | 14 ++ src/kuchFIle.ts | 16 ++ 12 files changed, 488 insertions(+), 4 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/encodings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/ng-conf-2016-hackathon-app.iml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 npm-debug.log create mode 100644 src/footer.ts create mode 100644 src/header.ts create mode 100644 src/kuchFIle.ts diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..d5008af --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +ng-conf-2016-hackathon-app \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 0000000..97626ba --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..72abef0 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..f74105c --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/ng-conf-2016-hackathon-app.iml b/.idea/ng-conf-2016-hackathon-app.iml new file mode 100644 index 0000000..c956989 --- /dev/null +++ b/.idea/ng-conf-2016-hackathon-app.iml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..fa22054 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,353 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + $PROJECT_DIR$ + true + + bdd + + DIRECTORY + + false + + + + + + + + 1462466693261 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/npm-debug.log b/npm-debug.log new file mode 100644 index 0000000..e031ba0 --- /dev/null +++ b/npm-debug.log @@ -0,0 +1,40 @@ +0 info it worked if it ends with ok +1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe', +1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js', +1 verbose cli 'run', +1 verbose cli 'lite' ] +2 info using npm@2.14.4 +3 info using node@v4.1.1 +4 verbose run-script [ 'prelite', 'lite', 'postlite' ] +5 info prelite a2-countries-and-capitals@1.0.0 +6 info lite a2-countries-and-capitals@1.0.0 +7 verbose unsafe-perm in lifecycle true +8 info a2-countries-and-capitals@1.0.0 Failed to exec lite script +9 verbose stack Error: a2-countries-and-capitals@1.0.0 lite: `lite-server` +9 verbose stack Exit status 1 +9 verbose stack at EventEmitter. (C:\Program Files\nodejs\node_modules\npm\lib\utils\lifecycle.js:214:16) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at EventEmitter.emit (events.js:172:7) +9 verbose stack at ChildProcess. (C:\Program Files\nodejs\node_modules\npm\lib\utils\spawn.js:24:14) +9 verbose stack at emitTwo (events.js:87:13) +9 verbose stack at ChildProcess.emit (events.js:172:7) +9 verbose stack at maybeClose (internal/child_process.js:817:16) +9 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5) +10 verbose pkgid a2-countries-and-capitals@1.0.0 +11 verbose cwd D:\Hackathon\ng-conf-2016-hackathon-app +12 error Windows_NT 10.0.10586 +13 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "run" "lite" +14 error node v4.1.1 +15 error npm v2.14.4 +16 error code ELIFECYCLE +17 error a2-countries-and-capitals@1.0.0 lite: `lite-server` +17 error Exit status 1 +18 error Failed at the a2-countries-and-capitals@1.0.0 lite script 'lite-server'. +18 error This is most likely a problem with the a2-countries-and-capitals package, +18 error not with npm itself. +18 error Tell the author that this fails on your system: +18 error lite-server +18 error You can get their info via: +18 error npm owner ls a2-countries-and-capitals +18 error There is likely additional logging output above. +19 verbose exit [ 1, true ] diff --git a/src/bootstrap.ts b/src/bootstrap.ts index 74df08e..7c43691 100644 --- a/src/bootstrap.ts +++ b/src/bootstrap.ts @@ -1,12 +1,14 @@ import {bootstrap} from 'angular2/platform/browser'; import {Component} from 'angular2/core'; - +import {Header} from './header'; +import {Bech} from './kuchFIle'; +import {Footer} from './footer'; @Component({ selector: 'app', - template: ` -

Countries and Capitals

- `, + template: '
' + + '', + directives : [Header, Bech,Footer] }) export class App {} diff --git a/src/footer.ts b/src/footer.ts new file mode 100644 index 0000000..1c4c20c --- /dev/null +++ b/src/footer.ts @@ -0,0 +1,17 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Component} from 'angular2/core'; + + +@Component({ + selector: 'footer', + template: ` + + `, +}) +export class Footer { + goToDetails(){ + console.log('hello'); + } +} + + diff --git a/src/header.ts b/src/header.ts new file mode 100644 index 0000000..86f0b37 --- /dev/null +++ b/src/header.ts @@ -0,0 +1,14 @@ +import {bootstrap} from 'angular2/platform/browser'; +import {Component} from 'angular2/core'; + + +@Component({ + selector: 'header', + template: ` +

Countries aur wo

+
+ `, +}) +export class Header {} + + diff --git a/src/kuchFIle.ts b/src/kuchFIle.ts new file mode 100644 index 0000000..8ac3920 --- /dev/null +++ b/src/kuchFIle.ts @@ -0,0 +1,16 @@ +import {Component} from 'angular2/core'; + + +@Component({ + selector: 'bech', + template: `

First day of hackathon going pretty well.
going through changess

+
+
+
+ ` +}) +export class Bech { + +} + + From 60c3c516128cc2878d6d373e4578ebbbc5e39ea4 Mon Sep 17 00:00:00 2001 From: zainmustafa Date: Thu, 5 May 2016 23:56:24 +0500 Subject: [PATCH 2/3] Add footer --- .idea/workspace.xml | 97 ++++++++++++++++++++++-------------- src/bootstrap.ts | 5 +- src/footer.ts | 2 +- src/{kuchFIle.ts => home.ts} | 0 4 files changed, 64 insertions(+), 40 deletions(-) rename src/{kuchFIle.ts => home.ts} (100%) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index fa22054..b756bd4 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,11 +2,10 @@ - - - - + + + @@ -27,10 +26,10 @@ - - + + - + @@ -39,12 +38,34 @@ + + + + + + + + + + + + + + + + + + + + - - - + + + + + @@ -67,10 +88,10 @@ @@ -242,7 +263,7 @@ - + @@ -297,14 +318,6 @@ - - - - - - - - @@ -313,14 +326,6 @@ - - - - - - - - @@ -331,23 +336,41 @@ - + - - - + + + + + - + - - + + - + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/bootstrap.ts b/src/bootstrap.ts index 7c43691..91a9b6d 100644 --- a/src/bootstrap.ts +++ b/src/bootstrap.ts @@ -1,13 +1,14 @@ import {bootstrap} from 'angular2/platform/browser'; import {Component} from 'angular2/core'; import {Header} from './header'; -import {Bech} from './kuchFIle'; +import {Bech} from './home'; import {Footer} from './footer'; @Component({ selector: 'app', template: '
' + - '', + '' + + '
', directives : [Header, Bech,Footer] }) export class App {} diff --git a/src/footer.ts b/src/footer.ts index 1c4c20c..244f712 100644 --- a/src/footer.ts +++ b/src/footer.ts @@ -5,7 +5,7 @@ import {Component} from 'angular2/core'; @Component({ selector: 'footer', template: ` - +
`, }) export class Footer { diff --git a/src/kuchFIle.ts b/src/home.ts similarity index 100% rename from src/kuchFIle.ts rename to src/home.ts From 7b5436b2f2a6518f7a8ea6a113d28589a81e1d1b Mon Sep 17 00:00:00 2001 From: zainmustafa Date: Fri, 6 May 2016 00:45:24 +0500 Subject: [PATCH 3/3] Add countries route with hardcode array --- .idea/workspace.xml | 96 ++++++++++++++++++++++++++------------------- index.html | 3 +- src/bootstrap.ts | 23 ++++++++--- src/countries.ts | 12 ++++++ src/footer.ts | 9 ++--- 5 files changed, 92 insertions(+), 51 deletions(-) create mode 100644 src/countries.ts diff --git a/.idea/workspace.xml b/.idea/workspace.xml index b756bd4..a6a95ad 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,11 @@ + + - @@ -30,7 +31,7 @@ - + @@ -38,11 +39,21 @@ - + - - + + + + + + + + + + + + @@ -51,8 +62,8 @@ - - + + @@ -61,10 +72,10 @@ - - + + - + @@ -86,12 +97,13 @@ @@ -166,20 +178,6 @@