# HG changeset patch # User casties # Date 1452175455 -3600 # Node ID 39ec75917ef71451be84ce61f4b673beba923a78 first checkin diff -r 000000000000 -r 39ec75917ef7 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,5 @@ + +syntax: regexp +^node_modules$ +syntax: regexp +^\.project$ \ No newline at end of file diff -r 000000000000 -r 39ec75917ef7 app/app.component.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/app.component.ts Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,17 @@ +import {Component} from 'angular2/core'; + +import {QuerySelectComponent} from './query-select.component'; + +@Component({ + selector: 'my-text', + template: ` +

My Angular 2 Text: {{title}}

+

Selected option: {{selectedOption}}

+ + `, + directives: [QuerySelectComponent] +}) +export class AppComponent { + public title = 'huhu!'; + public selectedOption = 'unknown'; +} diff -r 000000000000 -r 39ec75917ef7 app/boot.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/boot.ts Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,4 @@ +import {bootstrap} from 'angular2/platform/browser' +import {AppComponent} from './app.component' + +bootstrap(AppComponent); diff -r 000000000000 -r 39ec75917ef7 app/query-select.component.ts --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/query-select.component.ts Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,31 @@ +import {Component} from 'angular2/core'; + +@Component({ + selector: 'query-select', + template: ` +

Selected option: {{selectedQuery}}

+ + + ` +}) +export class QuerySelectComponent { + public queryTypes = ['Object type is', 'Attribute contains']; + public selectedQuery = 'unknown'; + public query2Types = ['a', 'b', 'c']; + + onSelectType(event: any) { + var selected = event.target.value + this.selectedQuery = selected; + if (selected == 'Attribute contains') { + this.query2Types = ['d', 'e', 'f']; + } + } +} diff -r 000000000000 -r 39ec75917ef7 index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/index.html Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,33 @@ + + + + Angular 2 QuickStart + + + + + + + + + + + + + + + Loading... + + + diff -r 000000000000 -r 39ec75917ef7 package.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package.json Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,25 @@ +{ + "name": "angular2-quickstart", + "version": "1.0.0", + "scripts": { + "tsc": "tsc", + "tsc:w": "tsc -w", + "lite": "lite-server", + "start": "concurrent \"npm run tsc:w\" \"npm run lite\" " + }, + "license": "ISC", + "dependencies": { + "angular2": "2.0.0-beta.0", + "systemjs": "0.19.6", + "es6-promise": "^3.0.2", + "es6-shim": "^0.33.3", + "reflect-metadata": "0.1.2", + "rxjs": "5.0.0-beta.0", + "zone.js": "0.5.10" + }, + "devDependencies": { + "concurrently": "^1.0.0", + "lite-server": "^1.3.1", + "typescript": "^1.7.3" + } +} diff -r 000000000000 -r 39ec75917ef7 tsconfig.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tsconfig.json Thu Jan 07 15:04:15 2016 +0100 @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES5", + "module": "system", + "moduleResolution": "node", + "sourceMap": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "removeComments": false, + "noImplicitAny": false + }, + "exclude": [ + "node_modules" + ] +}