;
7 | }
8 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 | {{title}}
3 |
4 |
5 |
10 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/styles.css:
--------------------------------------------------------------------------------
1 | @import '../node_modules/bootstrap/dist/css/bootstrap.css';
2 | @import '../node_modules/font-awesome/css/font-awesome.css';
3 | @import '../node_modules/toastr/build/toastr.css';
4 |
5 | body {
6 | padding: 2em;
7 | }
8 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{gameName}}
3 |
4 |
5 | {{seller.name}}
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{gameName}}
3 |
4 |
5 | {{seller.name}}
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{gameName}}
3 |
4 |
5 | {{seller.name}}
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent {
9 | }
10 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{gameName}}
3 |
4 |
5 | {{seller.name}}
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/e2e",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types":[
8 | "jasmine",
9 | "node"
10 | ]
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "types": []
7 | },
8 | "exclude": [
9 | "src/test.ts",
10 | "**/*.spec.ts"
11 | ]
12 | }
13 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "baseUrl": "",
7 | "types": []
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/e2e/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, element, by } from 'protractor';
2 |
3 | export class GameCatalogPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/e2e/tsconfig.e2e.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "types": [
8 | "jasmine",
9 | "jasminewd2",
10 | "node"
11 | ]
12 | }
13 | }
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "module": "es2015",
6 | "baseUrl": "",
7 | "types": []
8 | },
9 | "exclude": [
10 | "test.ts",
11 | "**/*.spec.ts"
12 | ]
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/pipes/available.pipe.ts:
--------------------------------------------------------------------------------
1 | import { Pipe, PipeTransform } from '@angular/core';
2 |
3 | @Pipe({ name: 'available' })
4 | export class AvailablePipe implements PipeTransform {
5 | transform(value: number): string {
6 | return (value > 0) ?
7 | 'fa fa-check' :
8 | 'fa fa-times';
9 | }
10 | }
11 |
12 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 | {{title}}
3 |
4 |
5 |
6 |
7 |
8 | {{game.name}}
9 |
10 |
11 |
12 | {{game.getYearsFromRelease()}}
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{seller.name}}
3 | Cantidad disponible: {{seller.amount}}
4 | Precio unitario: {{seller.price | currency:'EUR':true}}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{seller.name}}
3 | Cantidad disponible: {{seller.amount}}
4 | Precio unitario: {{seller.price | currency:'EUR':true}}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{seller.name}}
3 | Cantidad disponible: {{seller.amount}}
4 | Precio unitario: {{seller.price | currency:'EUR':true}}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/navbar/navbar.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-navbar',
5 | templateUrl: './navbar.component.html',
6 | styles: [`
7 | .nav.navbar-nav { font-size: 15px; }
8 | li > a.active { color: #F97924 }
9 | `]
10 | })
11 | export class NavbarComponent {}
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
{{seller.name}}
3 | Cantidad disponible: {{seller.amount}}
4 | Precio unitario: {{seller.price | currency:'EUR':true}}
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/errors/404.component.ts:
--------------------------------------------------------------------------------
1 | import { Component } from '@angular/core';
2 |
3 | @Component({
4 | template: `
5 | 400'd
6 | `,
7 | styles: [`
8 | .errorMessage {
9 | margin-top: 150px;
10 | font-size: 170px;
11 | text-align: center;
12 | }
13 | `]
14 | })
15 | export class Error404Component {}
16 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/seller/seller-details/seller-details.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-seller-details',
6 | templateUrl: './seller-details.component.html'
7 | })
8 | export class SellerDetailsComponent {
9 | @Input() seller: ISeller;
10 | }
11 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-root',
5 | templateUrl: './app.component.html',
6 | styleUrls: ['./app.component.css']
7 | })
8 | export class AppComponent implements OnInit {
9 | title: string = null;
10 |
11 | ngOnInit(): void {
12 | this.title = 'app works!';
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GameCatalog
6 |
7 |
8 |
9 |
10 |
11 |
12 | Loading...
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/game-sellers/game-sellers.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-game-sellers',
6 | templateUrl: './game-sellers.component.html',
7 | })
8 | export class GameSellersComponent {
9 | @Input() sellers: ISeller[];
10 | @Input() gameName: string;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game-sellers/game-sellers.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-game-sellers',
6 | templateUrl: './game-sellers.component.html',
7 | })
8 | export class GameSellersComponent {
9 | @Input() sellers: ISeller[];
10 | @Input() gameName: string;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/app/game-sellers/game-sellers.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-game-sellers',
6 | templateUrl: './game-sellers.component.html',
7 | })
8 | export class GameSellersComponent {
9 | @Input() sellers: ISeller[];
10 | @Input() gameName: string;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game-sellers/game-sellers.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 | import { ISeller } from '../models/seller.model';
3 |
4 | @Component({
5 | selector: 'app-game-sellers',
6 | templateUrl: './game-sellers.component.html',
7 | })
8 | export class GameSellersComponent {
9 | @Input() sellers: ISeller[];
10 | @Input() gameName: string;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule);
12 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
21 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule);
12 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule);
12 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "types": [
7 | "jasmine",
8 | "node"
9 | ]
10 | },
11 | "files": [
12 | "test.ts",
13 | "polyfills.ts"
14 | ],
15 | "include": [
16 | "**/*.spec.ts",
17 | "**/*.d.ts"
18 | ]
19 | }
20 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tslint.json",
3 | "rules": {
4 | "directive-selector": [
5 | true,
6 | "attribute",
7 | "app",
8 | "camelCase"
9 | ],
10 | "component-selector": [
11 | true,
12 | "element",
13 | "app",
14 | "kebab-case"
15 | ]
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/e2e/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "baseUrl": "",
8 | "types": [
9 | "jasmine",
10 | "node"
11 | ]
12 | },
13 | "files": [
14 | "test.ts"
15 | ],
16 | "include": [
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { GameCatalogPage } from './app.po';
2 |
3 | describe('game-catalog App', () => {
4 | let page: GameCatalogPage;
5 |
6 | beforeEach(() => {
7 | page = new GameCatalogPage();
8 | });
9 |
10 | it('should display message saying app works', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('app works!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/browserslist:
--------------------------------------------------------------------------------
1 | # This file is currently used by autoprefixer to adjust CSS to support the below specified browsers
2 | # For additional information regarding the format and rule options, please see:
3 | # https://github.com/browserslist/browserslist#queries
4 | # For IE 9-11 support, please uncomment the last line of the file and adjust as needed
5 | > 0.5%
6 | last 2 versions
7 | Firefox ESR
8 | not dead
9 | # IE 9-11
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "module": "commonjs",
6 | "target": "es5",
7 | "baseUrl": "",
8 | "types": [
9 | "jasmine",
10 | "node"
11 | ]
12 | },
13 | "files": [
14 | "test.ts"
15 | ],
16 | "include": [
17 | "**/*.spec.ts",
18 | "**/*.d.ts"
19 | ]
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{game.name}}
5 |
6 |
7 |
8 | {{game.getYearsFromRelease()}}
9 |
10 |
11 |
![game image]()
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game/game-list/game-list.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/main.ts:
--------------------------------------------------------------------------------
1 | import { enableProdMode } from '@angular/core';
2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
3 |
4 | import { AppModule } from './app/app.module';
5 | import { environment } from './environments/environment';
6 |
7 | if (environment.production) {
8 | enableProdMode();
9 | }
10 |
11 | platformBrowserDynamic().bootstrapModule(AppModule)
12 | .catch(err => console.log(err));
13 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // The file contents for the current environment will overwrite these during build.
2 | // The build system defaults to the dev environment which uses `environment.ts`, but if you do
3 | // `ng build --env=prod` then `environment.prod.ts` will be used instead.
4 | // The list of which env maps to which file can be found in `.angular-cli.json`.
5 |
6 | export const environment = {
7 | production: false
8 | };
9 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/app.routes.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 | import { GameListComponent } from './game/game-list/game-list.component';
3 | import { CreateGameComponent } from './game/create-game/create-game.component';
4 |
5 | export const appRoutes: Routes = [
6 | { path: 'games', component: GameListComponent },
7 | { path: 'games/new', component: CreateGameComponent },
8 | { path: '', redirectTo: '/games', pathMatch: 'full' },
9 | ];
10 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/server/routes/sellerCategoryRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | sellerCategoryRouter = express.Router();
3 | SellerCategory = require('../models/sellerCategoryModel');
4 |
5 | const routes = () => {
6 | sellerCategoryRouter.route('/')
7 | .get((req, res) => {
8 | res.json(SellerCategory.getSellerCategories());
9 | });
10 |
11 | return sellerCategoryRouter;
12 | };
13 |
14 | module.exports = routes;
15 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/server/routes/sellerCategoryRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | sellerCategoryRouter = express.Router();
3 | SellerCategory = require('../models/sellerCategoryModel');
4 |
5 | const routes = () => {
6 | sellerCategoryRouter.route('/')
7 | .get((req, res) => {
8 | res.json(SellerCategory.getSellerCategories());
9 | });
10 |
11 | return sellerCategoryRouter;
12 | };
13 |
14 | module.exports = routes;
15 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/server/routes/sellerCategoryRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | sellerCategoryRouter = express.Router();
3 | SellerCategory = require('../models/sellerCategoryModel');
4 |
5 | const routes = () => {
6 | sellerCategoryRouter.route('/')
7 | .get((req, res) => {
8 | res.json(SellerCategory.getSellerCategories());
9 | });
10 |
11 | return sellerCategoryRouter;
12 | };
13 |
14 | module.exports = routes;
15 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/server/routes/sellerCategoryRoutes.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | sellerCategoryRouter = express.Router();
3 | SellerCategory = require('../models/sellerCategoryModel');
4 |
5 | const routes = () => {
6 | sellerCategoryRouter.route('/')
7 | .get((req, res) => {
8 | res.json(SellerCategory.getSellerCategories());
9 | });
10 |
11 | return sellerCategoryRouter;
12 | };
13 |
14 | module.exports = routes;
15 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/services/checkDirty.service.ts:
--------------------------------------------------------------------------------
1 | import { InjectionToken } from '@angular/core';
2 | import { CreateGameComponent } from '../game/create-game/create-game.component';
3 |
4 | export let CHECKDIRTY_TOKEN = new InjectionToken('checkDirty');
5 |
6 | export function checkDirtyState(component: CreateGameComponent) {
7 | if (component.isDirty) {
8 | return window.confirm('You do not saved, do yo really want to cancel?')
9 | }
10 | return true;
11 | }
12 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "baseUrl": "src",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2016",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "baseUrl": "src",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2016",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "baseUrl": "src",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2016",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "outDir": "./dist/out-tsc",
5 | "baseUrl": "src",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2016",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{seller.name}}
5 |
6 |
7 | Cantidad disponible: {{seller.amount}}
8 | Precio unitario: {{seller.price | currency:'EUR':true}}
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "moduleResolution": "node",
9 | "emitDecoratorMetadata": true,
10 | "experimentalDecorators": true,
11 | "target": "es5",
12 | "typeRoots": [
13 | "node_modules/@types"
14 | ],
15 | "lib": [
16 | "es2017",
17 | "dom"
18 | ]
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/seller/seller-details/seller-details.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{seller.name}}
5 |
6 |
7 | Cantidad disponible: {{seller.amount}}
8 | Precio unitario: {{seller.price | currency:'EUR':true}}
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/navbar/navbar.component.html:
--------------------------------------------------------------------------------
1 |
14 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/game/create-game/create-game.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Output, EventEmitter } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-create-game',
5 | templateUrl: './create-game.component.html',
6 | styles: [`
7 | em { color: red; }
8 | `]
9 | })
10 | export class CreateGameComponent {
11 | @Output() createGameEvent: EventEmitter = new EventEmitter();
12 | createGame(formValues: any): void {
13 | this.createGameEvent.emit(formValues);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game/create-game/create-game.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Output, EventEmitter } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-create-game',
5 | templateUrl: './create-game.component.html',
6 | styles: [`
7 | em { color: red; }
8 | `]
9 | })
10 | export class CreateGameComponent {
11 | @Output() createGameEvent: EventEmitter = new EventEmitter();
12 | createGame(formValues: any): void {
13 | this.createGameEvent.emit(formValues);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game/create-game/create-game.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Output, EventEmitter } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-create-game',
5 | templateUrl: './create-game.component.html',
6 | styles: [`
7 | em { color: red; }
8 | `]
9 | })
10 | export class CreateGameComponent {
11 | @Output() createGameEvent: EventEmitter = new EventEmitter();
12 | createGame(formValues: any): void {
13 | this.createGameEvent.emit(formValues);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/services/sellerCategory.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { ISellerCategory } from '../models/sellerCategory.model';
3 | import { HttpClient } from '@angular/common/http';
4 | import { Observable } from 'rxjs';
5 |
6 | @Injectable()
7 | export class SellerCategoryService {
8 | constructor (private http: HttpClient) {}
9 |
10 | getSellerCategories(): Observable {
11 | return this.http.get('/api/sellercategories');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/services/sellerCategory.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { ISellerCategory } from '../models/sellerCategory.model';
3 | import { HttpClient } from '@angular/common/http';
4 | import { Observable } from 'rxjs';
5 |
6 | @Injectable()
7 | export class SellerCategoryService {
8 | constructor (private http: HttpClient) {}
9 |
10 | getSellerCategories(): Observable {
11 | return this.http.get('/api/sellercategories');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/services/sellerCategory.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { ISellerCategory } from '../models/sellerCategory.model';
3 | import { HttpClient } from '@angular/common/http';
4 | import { Observable } from 'rxjs/Observable';
5 |
6 | @Injectable()
7 | export class SellerCategoryService {
8 | constructor (private http: HttpClient) {}
9 |
10 | getSellerCategories(): Observable {
11 | return this.http.get('/api/sellercategories');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/services/sellerCategory.service.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from '@angular/core';
2 | import { ISellerCategory } from '../models/sellerCategory.model';
3 | import { HttpClient } from '@angular/common/http';
4 | import { Observable } from 'rxjs/Observable';
5 |
6 | @Injectable()
7 | export class SellerCategoryService {
8 | constructor (private http: HttpClient) {}
9 |
10 | getSellerCategories(): Observable {
11 | return this.http.get('/api/sellercategories');
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { FormsModule } from '@angular/forms';
4 | import { HttpModule } from '@angular/http';
5 |
6 | import { AppComponent } from './app.component';
7 |
8 | @NgModule({
9 | declarations: [
10 | AppComponent
11 | ],
12 | imports: [
13 | BrowserModule,
14 | FormsModule,
15 | HttpModule
16 | ],
17 | providers: [],
18 | bootstrap: [AppComponent]
19 | })
20 | export class AppModule { }
21 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { FormsModule } from '@angular/forms';
4 | import { HttpModule } from '@angular/http';
5 |
6 | import { AppComponent } from './app.component';
7 |
8 | @NgModule({
9 | declarations: [
10 | AppComponent
11 | ],
12 | imports: [
13 | BrowserModule,
14 | FormsModule,
15 | HttpModule
16 | ],
17 | providers: [],
18 | bootstrap: [AppComponent]
19 | })
20 | export class AppModule { }
21 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # angular-5-sample-app
2 |
3 | Set of angular 5 incremental samples.
4 |
5 | # About Basefactor + Lemoncode
6 |
7 | We are an innovating team of Javascript experts, passionate about turning your ideas into robust products.
8 |
9 | [Basefactor, consultancy by Lemoncode](http://www.basefactor.com) provides consultancy and coaching services.
10 |
11 | [Lemoncode](http://lemoncode.net/services/en/#en-home) provides training services.
12 |
13 | For the LATAM/Spanish audience we are running an Online Front End Master degree, more info: http://lemoncode.net/master-frontend
14 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/game/game-summary.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input, Output, EventEmitter } from '@angular/core';
2 | import { Game } from '../models/game.model';
3 |
4 | @Component({
5 | selector: 'app-game-summary',
6 | templateUrl: './game-summary.component.html'
7 | })
8 | export class GameSummaryComponent {
9 | @Input() game: Game;
10 | @Output() gameChange: EventEmitter = new EventEmitter();
11 |
12 | selectedGame(gameNameElement: HTMLInputElement) {
13 | this.gameChange.emit(gameNameElement.value);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/src/app/app.routes.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 | import { GameListComponent } from './game/game-list/game-list.component';
3 | import { CreateGameComponent } from './game/create-game/create-game.component';
4 | import { CreateSellerComponent } from './seller/create-seller/create-seller.component';
5 |
6 | export const appRoutes: Routes = [
7 | { path: 'games', component: GameListComponent },
8 | { path: 'games/new', component: CreateGameComponent },
9 | { path: 'seller/new', component: CreateSellerComponent },
10 | { path: '', redirectTo: '/games', pathMatch: 'full' },
11 | ];
12 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/game/game-summary.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | {{game.name}}
7 |
8 |
9 |
10 | {{game.getYearsFromRelease()}}
11 |
12 |
13 |
![game image]()
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 | Game Details
2 |
3 |
4 |
Sellers
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
{{gameName}}
16 |
17 | {{seller.name}}
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/src/app/common/collapsible-card.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'collapsible-card',
5 | template: `
6 |
7 |
8 |
9 |
10 |
11 |
12 | `,
13 | styles: [`
14 | .pointable { cursor: pointer; }
15 | `]
16 | })
17 | export class CollapsibleCardComponent {
18 | visible = true;
19 |
20 | toggleContent() {
21 | this.visible = !this.visible;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 | Game Details
2 |
3 |
4 |
Sellers
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
{{gameName}}
16 |
17 | {{seller.name}}
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/src/app/common/collapsible-card.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, Input } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'collapsible-card',
5 | template: `
6 |
7 |
8 |
9 |
10 |
11 |
12 | `,
13 | styles: [`
14 | .pointable { cursor: pointer; }
15 | `]
16 | })
17 | export class CollapsibleCardComponent {
18 | visible = true;
19 |
20 | toggleContent() {
21 | this.visible = !this.visible;
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { FormsModule } from '@angular/forms';
4 | import { HttpModule } from '@angular/http';
5 |
6 | import { AppComponent } from './app.component';
7 | import { GameSummaryComponent } from './game/game-summary.component';
8 |
9 | @NgModule({
10 | declarations: [
11 | AppComponent,
12 | GameSummaryComponent
13 | ],
14 | imports: [
15 | BrowserModule,
16 | FormsModule,
17 | HttpModule
18 | ],
19 | providers: [],
20 | bootstrap: [AppComponent]
21 | })
22 | export class AppModule { }
23 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/src/app/game-sellers/game-sellers.component.html:
--------------------------------------------------------------------------------
1 | Game Details
2 |
3 |
4 |
Sellers
5 |
6 |
7 |
8 |
9 |
12 |
13 |
14 |
15 |
{{gameName}}
16 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | app = express(),
3 | bodyParser = require('body-parser');
4 |
5 | app.use(bodyParser.urlencoded({extended: true}));
6 | app.use(bodyParser.json());
7 |
8 |
9 | const gameRouter = require('./routes/gameRoutes');
10 | const sellerCategoryRouter = require('./routes/sellerCategoryRoutes');
11 | const userRouter = require('./routes/userRoutes');
12 |
13 | app.use('/api/games', gameRouter());
14 | app.use('/api/sellercategories', sellerCategoryRouter());
15 | app.use('/api/users', userRouter());
16 |
17 | const port = 3000;
18 | app.listen(port);
19 | console.log(`Server running on: ${port}`);
20 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | app = express(),
3 | bodyParser = require('body-parser');
4 |
5 | app.use(bodyParser.urlencoded({extended: true}));
6 | app.use(bodyParser.json());
7 |
8 |
9 | const gameRouter = require('./routes/gameRoutes');
10 | const sellerCategoryRouter = require('./routes/sellerCategoryRoutes');
11 | const userRouter = require('./routes/userRoutes');
12 |
13 | app.use('/api/games', gameRouter());
14 | app.use('/api/sellercategories', sellerCategoryRouter());
15 | app.use('/api/users', userRouter());
16 |
17 | const port = 3000;
18 | app.listen(port);
19 | console.log(`Server running on: ${port}`);
20 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | app = express(),
3 | bodyParser = require('body-parser');
4 |
5 | app.use(bodyParser.urlencoded({extended: true}));
6 | app.use(bodyParser.json());
7 |
8 |
9 | const gameRouter = require('./routes/gameRoutes');
10 | const sellerCategoryRouter = require('./routes/sellerCategoryRoutes');
11 | const userRouter = require('./routes/userRoutes');
12 |
13 | app.use('/api/games', gameRouter());
14 | app.use('/api/sellercategories', sellerCategoryRouter());
15 | app.use('/api/users', userRouter());
16 |
17 | const port = 3000;
18 | app.listen(port);
19 | console.log(`Server running on: ${port}`);
20 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/server/index.js:
--------------------------------------------------------------------------------
1 | const express = require('express'),
2 | app = express(),
3 | bodyParser = require('body-parser');
4 |
5 | app.use(bodyParser.urlencoded({extended: true}));
6 | app.use(bodyParser.json());
7 |
8 |
9 | const gameRouter = require('./routes/gameRoutes');
10 | const sellerCategoryRouter = require('./routes/sellerCategoryRoutes');
11 | const userRouter = require('./routes/userRoutes');
12 |
13 | app.use('/api/games', gameRouter());
14 | app.use('/api/sellercategories', sellerCategoryRouter());
15 | app.use('/api/users', userRouter());
16 |
17 | const port = 3000;
18 | app.listen(port);
19 | console.log(`Server running on: ${port}`);
20 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/src/app/app.component.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{title}}
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/09 Pipes/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/11 HTTP GET/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/00 HelloWorld/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/04 Template Form/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/06 Reactive Form/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/07 Navigation/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/12 HTTP POST/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/14 Directives/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/03 User Interactions/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/05 Registering Routes/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/10 Filtering Sorting/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/13 Using ng-content/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/01 Displaying Data/game-catalog/src/app/app.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 | import { Game } from './models/game.model';
3 |
4 | @Component({
5 | selector: 'app-root',
6 | templateUrl: './app.component.html',
7 | styleUrls: ['./app.component.css']
8 | })
9 | export class AppComponent implements OnInit {
10 | title = 'Displaying Data Demo';
11 | private games: Game[];
12 | game: Game;
13 |
14 | constructor() {
15 | this.games = [
16 | new Game('Super Mario Bros', '13 September 1985'),
17 | new Game('Legend of Zelda', '21 February 1986'),
18 | new Game('Sonic', '26 June 1981'),
19 | ];
20 | }
21 |
22 | ngOnInit(): void {
23 | this.game = this.games[0];
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/Demos/02 Displaying Collections/game-catalog/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # compiled output
4 | /dist
5 | /tmp
6 | /out-tsc
7 |
8 | # dependencies
9 | /node_modules
10 |
11 | # IDEs and editors
12 | /.idea
13 | .project
14 | .classpath
15 | .c9/
16 | *.launch
17 | .settings/
18 | *.sublime-workspace
19 |
20 | # IDE - VSCode
21 | .vscode/*
22 | !.vscode/settings.json
23 | !.vscode/tasks.json
24 | !.vscode/launch.json
25 | !.vscode/extensions.json
26 |
27 | # misc
28 | /.sass-cache
29 | /connect.lock
30 | /coverage
31 | /libpeerconnection.log
32 | npm-debug.log
33 | testem.log
34 | /typings
35 |
36 | # e2e
37 | /e2e/*.js
38 | /e2e/*.map
39 |
40 | # System Files
41 | .DS_Store
42 | Thumbs.db
43 |
--------------------------------------------------------------------------------
/Demos/08 Guards/game-catalog/src/test.ts:
--------------------------------------------------------------------------------
1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2 |
3 | import 'zone.js/dist/zone-testing';
4 | import { getTestBed } from '@angular/core/testing';
5 | import {
6 | BrowserDynamicTestingModule,
7 | platformBrowserDynamicTesting
8 | } from '@angular/platform-browser-dynamic/testing';
9 |
10 | declare const require: any;
11 |
12 | // First, initialize the Angular testing environment.
13 | getTestBed().initTestEnvironment(
14 | BrowserDynamicTestingModule,
15 | platformBrowserDynamicTesting()
16 | );
17 | // Then we find all the tests.
18 | const context = require.context('./', true, /\.spec\.ts$/);
19 | // And load the modules.
20 | context.keys().map(context);
21 |
--------------------------------------------------------------------------------