├── .editorconfig
├── .gitignore
├── README.md
├── angular.json
├── e2e
├── protractor.conf.js
├── src
│ ├── app.e2e-spec.ts
│ └── app.po.ts
└── tsconfig.e2e.json
├── extend.webpack.js
├── package-lock.json
├── package.json
├── src
├── app
│ ├── app.component.css
│ ├── app.component.html
│ ├── app.component.spec.ts
│ ├── app.component.ts
│ ├── app.module.ts
│ ├── app.routing-module.ts
│ ├── intro
│ │ ├── intro-parent
│ │ │ ├── intro-info
│ │ │ │ ├── intro-info.component.css
│ │ │ │ ├── intro-info.component.html
│ │ │ │ ├── intro-info.component.ts
│ │ │ │ └── intro-info.module.ts
│ │ │ ├── intro-parent.component.css
│ │ │ ├── intro-parent.component.html
│ │ │ ├── intro-parent.component.ts
│ │ │ ├── intro-parent.module.ts
│ │ │ ├── intro-personalize
│ │ │ │ ├── intro-personalize.component.css
│ │ │ │ ├── intro-personalize.component.html
│ │ │ │ ├── intro-personalize.component.ts
│ │ │ │ └── intro-personalize.module.ts
│ │ │ └── intro-reward
│ │ │ │ ├── intro-reward.component.css
│ │ │ │ ├── intro-reward.component.html
│ │ │ │ ├── intro-reward.component.spec.ts
│ │ │ │ ├── intro-reward.component.ts
│ │ │ │ └── intro-reward.module.ts
│ │ ├── intro.component.css
│ │ ├── intro.component.html
│ │ ├── intro.component.spec.ts
│ │ ├── intro.component.ts
│ │ ├── intro.module.ts
│ │ └── login
│ │ │ ├── login.component.css
│ │ │ ├── login.component.html
│ │ │ ├── login.component.spec.ts
│ │ │ ├── login.component.ts
│ │ │ └── login.module.ts
│ └── main
│ │ ├── kid
│ │ ├── earn
│ │ │ ├── earn.component.css
│ │ │ ├── earn.component.html
│ │ │ ├── earn.component.spec.ts
│ │ │ ├── earn.component.ts
│ │ │ └── earn.module.ts
│ │ ├── friends
│ │ │ ├── friends.component.css
│ │ │ ├── friends.component.html
│ │ │ ├── friends.component.spec.ts
│ │ │ ├── friends.component.ts
│ │ │ └── friends.module.ts
│ │ ├── home
│ │ │ ├── home.component.css
│ │ │ ├── home.component.html
│ │ │ ├── home.component.spec.ts
│ │ │ ├── home.component.ts
│ │ │ └── home.module.ts
│ │ ├── kid.component.css
│ │ ├── kid.component.html
│ │ ├── kid.component.spec.ts
│ │ ├── kid.component.ts
│ │ ├── kid.module.ts
│ │ ├── question
│ │ │ ├── question.component.css
│ │ │ ├── question.component.html
│ │ │ ├── question.component.spec.ts
│ │ │ ├── question.component.ts
│ │ │ └── question.module.ts
│ │ ├── reports
│ │ │ ├── reports.component.css
│ │ │ ├── reports.component.html
│ │ │ ├── reports.component.spec.ts
│ │ │ ├── reports.component.ts
│ │ │ └── reports.module.ts
│ │ └── rewards
│ │ │ ├── badges
│ │ │ ├── badges.component.css
│ │ │ ├── badges.component.html
│ │ │ ├── badges.component.spec.ts
│ │ │ ├── badges.component.ts
│ │ │ └── badges.module.ts
│ │ │ ├── games
│ │ │ ├── games.component.css
│ │ │ ├── games.component.html
│ │ │ ├── games.component.spec.ts
│ │ │ ├── games.component.ts
│ │ │ └── games.module.ts
│ │ │ ├── rewards.component.css
│ │ │ ├── rewards.component.html
│ │ │ ├── rewards.component.spec.ts
│ │ │ ├── rewards.component.ts
│ │ │ └── rewards.module.ts
│ │ ├── main.component.css
│ │ ├── main.component.html
│ │ ├── main.component.spec.ts
│ │ ├── main.component.ts
│ │ ├── main.module.ts
│ │ └── parent
│ │ ├── faq
│ │ ├── faq.component.css
│ │ ├── faq.component.html
│ │ ├── faq.component.spec.ts
│ │ ├── faq.component.ts
│ │ └── faq.module.ts
│ │ ├── parent-home
│ │ ├── home.component.spec.ts
│ │ ├── parent-home.component.css
│ │ ├── parent-home.component.html
│ │ ├── parent-home.component.ts
│ │ └── parent-home.module.ts
│ │ ├── parent.component.css
│ │ ├── parent.component.html
│ │ ├── parent.component.spec.ts
│ │ ├── parent.component.ts
│ │ ├── parent.module.ts
│ │ ├── settings
│ │ ├── settings.component.css
│ │ ├── settings.component.html
│ │ ├── settings.component.spec.ts
│ │ ├── settings.component.ts
│ │ └── settings.module.ts
│ │ └── verify
│ │ ├── verify.component.css
│ │ ├── verify.component.html
│ │ ├── verify.component.spec.ts
│ │ ├── verify.component.ts
│ │ └── verify.module.ts
├── assets
│ └── .gitkeep
├── browserslist
├── environments
│ ├── environment.prod.ts
│ └── environment.ts
├── favicon.ico
├── index.html
├── karma.conf.js
├── main.ts
├── polyfills.ts
├── styles.css
├── test.ts
├── tsconfig.app.json
├── tsconfig.spec.json
└── tslint.json
├── tsconfig.json
└── tslint.json
/.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 |
--------------------------------------------------------------------------------
/.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 | yarn-error.log
34 | testem.log
35 | /typings
36 |
37 | # System Files
38 | .DS_Store
39 | Thumbs.db
40 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Guess.js Angular demo
2 |
3 | Data-driven bundling with Guess.js.
4 |
5 | ## Usage
6 |
7 | Since you'll not be able to access the Google Analytics data the current project uses, explore the configuration at `extend.webpack.js`.
8 |
9 | You will notice that the last plugin in this ejected Angular CLI application is `GuessPlugin` which has quite minimalistic setup:
10 |
11 | ```js
12 | new GuessPlugin({
13 |
14 | // View ID for your Google Analytics project
15 | GA: 'XXXXXXXXX',
16 |
17 | // Optional
18 | period: {
19 | startDate: new Date('2016-1-2'),
20 | endDate: new Date('2018-2-24'),
21 | }
22 | })
23 | ```
24 |
25 | The project also defines a `routeFormatter` which is an optional property that you'll most likely not need.
26 |
27 | ## License
28 |
29 | MIT
30 |
--------------------------------------------------------------------------------
/angular.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3 | "version": 1,
4 | "newProjectRoot": "projects",
5 | "projects": {
6 | "guess-js-angular-demo": {
7 | "root": "",
8 | "sourceRoot": "src",
9 | "projectType": "application",
10 | "prefix": "app",
11 | "schematics": {},
12 | "architect": {
13 | "build": {
14 | "builder": "@angular-builders/custom-webpack:browser",
15 | "options": {
16 | "customWebpackConfig": {
17 | "path": "./extend.webpack.js"
18 | },
19 | "outputPath": "dist/guess-js-angular-demo",
20 | "index": "src/index.html",
21 | "main": "src/main.ts",
22 | "polyfills": "src/polyfills.ts",
23 | "tsConfig": "src/tsconfig.app.json",
24 | "assets": [
25 | "src/favicon.ico",
26 | "src/assets"
27 | ],
28 | "styles": [
29 | "src/styles.css"
30 | ],
31 | "scripts": []
32 | },
33 | "configurations": {
34 | "production": {
35 | "fileReplacements": [
36 | {
37 | "replace": "src/environments/environment.ts",
38 | "with": "src/environments/environment.prod.ts"
39 | }
40 | ],
41 | "optimization": true,
42 | "outputHashing": "all",
43 | "sourceMap": false,
44 | "extractCss": true,
45 | "namedChunks": false,
46 | "aot": true,
47 | "extractLicenses": true,
48 | "vendorChunk": false,
49 | "buildOptimizer": true,
50 | "budgets": [
51 | {
52 | "type": "initial",
53 | "maximumWarning": "2mb",
54 | "maximumError": "5mb"
55 | }
56 | ]
57 | }
58 | }
59 | },
60 | "serve": {
61 | "builder": "@angular-devkit/build-angular:dev-server",
62 | "options": {
63 | "browserTarget": "guess-js-angular-demo:build"
64 | },
65 | "configurations": {
66 | "production": {
67 | "browserTarget": "guess-js-angular-demo:build:production"
68 | }
69 | }
70 | },
71 | "extract-i18n": {
72 | "builder": "@angular-devkit/build-angular:extract-i18n",
73 | "options": {
74 | "browserTarget": "guess-js-angular-demo:build"
75 | }
76 | },
77 | "test": {
78 | "builder": "@angular-devkit/build-angular:karma",
79 | "options": {
80 | "main": "src/test.ts",
81 | "polyfills": "src/polyfills.ts",
82 | "tsConfig": "src/tsconfig.spec.json",
83 | "karmaConfig": "src/karma.conf.js",
84 | "styles": [
85 | "src/styles.css"
86 | ],
87 | "scripts": [],
88 | "assets": [
89 | "src/favicon.ico",
90 | "src/assets"
91 | ]
92 | }
93 | },
94 | "lint": {
95 | "builder": "@angular-devkit/build-angular:tslint",
96 | "options": {
97 | "tsConfig": [
98 | "src/tsconfig.app.json",
99 | "src/tsconfig.spec.json"
100 | ],
101 | "exclude": [
102 | "**/node_modules/**"
103 | ]
104 | }
105 | }
106 | }
107 | },
108 | "guess-js-angular-demo-e2e": {
109 | "root": "e2e/",
110 | "projectType": "application",
111 | "prefix": "",
112 | "architect": {
113 | "e2e": {
114 | "builder": "@angular-devkit/build-angular:protractor",
115 | "options": {
116 | "protractorConfig": "e2e/protractor.conf.js",
117 | "devServerTarget": "guess-js-angular-demo:serve"
118 | },
119 | "configurations": {
120 | "production": {
121 | "devServerTarget": "guess-js-angular-demo:serve:production"
122 | }
123 | }
124 | },
125 | "lint": {
126 | "builder": "@angular-devkit/build-angular:tslint",
127 | "options": {
128 | "tsConfig": "e2e/tsconfig.e2e.json",
129 | "exclude": [
130 | "**/node_modules/**"
131 | ]
132 | }
133 | }
134 | }
135 | }
136 | },
137 | "defaultProject": "guess-js-angular-demo"
138 | }
--------------------------------------------------------------------------------
/e2e/protractor.conf.js:
--------------------------------------------------------------------------------
1 | // Protractor configuration file, see link for more information
2 | // https://github.com/angular/protractor/blob/master/lib/config.ts
3 |
4 | const { SpecReporter } = require('jasmine-spec-reporter');
5 |
6 | exports.config = {
7 | allScriptsTimeout: 11000,
8 | specs: [
9 | './src/**/*.e2e-spec.ts'
10 | ],
11 | capabilities: {
12 | 'browserName': 'chrome'
13 | },
14 | directConnect: true,
15 | baseUrl: 'http://localhost:4200/',
16 | framework: 'jasmine',
17 | jasmineNodeOpts: {
18 | showColors: true,
19 | defaultTimeoutInterval: 30000,
20 | print: function() {}
21 | },
22 | onPrepare() {
23 | require('ts-node').register({
24 | project: require('path').join(__dirname, './tsconfig.e2e.json')
25 | });
26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
27 | }
28 | };
--------------------------------------------------------------------------------
/e2e/src/app.e2e-spec.ts:
--------------------------------------------------------------------------------
1 | import { AppPage } from './app.po';
2 |
3 | describe('workspace-project App', () => {
4 | let page: AppPage;
5 |
6 | beforeEach(() => {
7 | page = new AppPage();
8 | });
9 |
10 | it('should display welcome message', () => {
11 | page.navigateTo();
12 | expect(page.getParagraphText()).toEqual('Welcome to guess-js-angular-demo!');
13 | });
14 | });
15 |
--------------------------------------------------------------------------------
/e2e/src/app.po.ts:
--------------------------------------------------------------------------------
1 | import { browser, by, element } from 'protractor';
2 |
3 | export class AppPage {
4 | navigateTo() {
5 | return browser.get('/');
6 | }
7 |
8 | getParagraphText() {
9 | return element(by.css('app-root h1')).getText();
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/extend.webpack.js:
--------------------------------------------------------------------------------
1 | const { GuessPlugin } = require('guess-webpack');
2 | const { parseRoutes } = require('guess-parser');
3 |
4 | module.exports = {
5 | plugins: [
6 | new GuessPlugin({
7 | GA: '128035004',
8 | period: {
9 | startDate: new Date('2016-1-2'),
10 | endDate: new Date('2018-2-24')
11 | },
12 | runtime: {
13 | delegate: false
14 | },
15 | routeProvider() {
16 | return parseRoutes('.');
17 | },
18 | routeFormatter(path) {
19 | return path.replace(/^\/app/, '');
20 | }
21 | })
22 | ]
23 | };
24 |
25 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "guess-js-angular-demo",
3 | "version": "0.0.0",
4 | "scripts": {
5 | "ng": "ng",
6 | "start": "ng serve",
7 | "build": "ng build",
8 | "test": "ng test",
9 | "lint": "ng lint",
10 | "e2e": "ng e2e"
11 | },
12 | "private": true,
13 | "dependencies": {
14 | "@angular/animations": "~7.0.0",
15 | "@angular/common": "~7.0.0",
16 | "@angular/compiler": "~7.0.0",
17 | "@angular/core": "~7.0.0",
18 | "@angular/forms": "~7.0.0",
19 | "@angular/http": "~7.0.0",
20 | "@angular/platform-browser": "~7.0.0",
21 | "@angular/platform-browser-dynamic": "~7.0.0",
22 | "@angular/router": "~7.0.0",
23 | "core-js": "^2.5.4",
24 | "rxjs": "~6.3.3",
25 | "zone.js": "~0.8.26"
26 | },
27 | "devDependencies": {
28 | "@angular-builders/custom-webpack": "^7.0.0",
29 | "@angular-devkit/build-angular": "^0.10.3",
30 | "@angular/cli": "~7.0.3",
31 | "@angular/compiler-cli": "~7.0.0",
32 | "@angular/language-service": "~7.0.0",
33 | "@types/jasmine": "~2.8.8",
34 | "@types/jasminewd2": "~2.0.3",
35 | "@types/node": "~8.9.4",
36 | "codelyzer": "~4.5.0",
37 | "guess-parser": "^0.1.6",
38 | "guess-webpack": "^0.1.6",
39 | "jasmine-core": "~2.99.1",
40 | "jasmine-spec-reporter": "~4.2.1",
41 | "karma": "~3.0.0",
42 | "karma-chrome-launcher": "~2.2.0",
43 | "karma-coverage-istanbul-reporter": "~2.0.1",
44 | "karma-jasmine": "~1.1.2",
45 | "karma-jasmine-html-reporter": "^0.2.2",
46 | "protractor": "~5.4.0",
47 | "ts-node": "~7.0.0",
48 | "tslint": "~5.11.0",
49 | "typescript": "~3.1.1"
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/src/app/app.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/app.component.css
--------------------------------------------------------------------------------
/src/app/app.component.html:
--------------------------------------------------------------------------------
1 | Intro
2 | Main
3 |
4 |
5 |
--------------------------------------------------------------------------------
/src/app/app.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { TestBed, async } from '@angular/core/testing';
2 | import { AppComponent } from './app.component';
3 | describe('AppComponent', () => {
4 | beforeEach(
5 | async(() => {
6 | TestBed.configureTestingModule({
7 | declarations: [AppComponent]
8 | }).compileComponents();
9 | })
10 | );
11 | it(
12 | 'should create the app',
13 | async(() => {
14 | const fixture = TestBed.createComponent(AppComponent);
15 | const app = fixture.debugElement.componentInstance;
16 | expect(app).toBeTruthy();
17 | })
18 | );
19 | it(
20 | `should have as title 'app'`,
21 | async(() => {
22 | const fixture = TestBed.createComponent(AppComponent);
23 | const app = fixture.debugElement.componentInstance;
24 | expect(app.title).toEqual('app');
25 | })
26 | );
27 | it(
28 | 'should render title in a h1 tag',
29 | async(() => {
30 | const fixture = TestBed.createComponent(AppComponent);
31 | fixture.detectChanges();
32 | const compiled = fixture.debugElement.nativeElement;
33 | expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!');
34 | })
35 | );
36 | });
37 |
--------------------------------------------------------------------------------
/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 | title = 'app';
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/app.module.ts:
--------------------------------------------------------------------------------
1 | import { BrowserModule } from '@angular/platform-browser';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { AppComponent } from './app.component';
6 | import { appRoutes } from './app.routing-module';
7 |
8 | @NgModule({
9 | declarations: [AppComponent],
10 | imports: [BrowserModule, RouterModule.forRoot(appRoutes)],
11 | exports: [RouterModule],
12 | bootstrap: [AppComponent]
13 | })
14 | export class AppModule {}
15 |
--------------------------------------------------------------------------------
/src/app/app.routing-module.ts:
--------------------------------------------------------------------------------
1 | import { Routes } from '@angular/router';
2 |
3 | export const appRoutes: Routes = [
4 | {
5 | path: '',
6 | pathMatch: 'full',
7 | redirectTo: 'intro'
8 | },
9 | {
10 | loadChildren: './intro/intro.module#IntroModule',
11 | path: 'intro'
12 | },
13 | {
14 | loadChildren: './main/main.module#MainModule',
15 | path: 'main'
16 | }
17 | ];
18 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-info/intro-info.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/intro-parent/intro-info/intro-info.component.css
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-info/intro-info.component.html:
--------------------------------------------------------------------------------
1 |
2 | info works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-info/intro-info.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-intro-info',
5 | templateUrl: './intro-info.component.html',
6 | styleUrls: ['./intro-info.component.css']
7 | })
8 | export class InfoComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-info/intro-info.module.ts:
--------------------------------------------------------------------------------
1 | import { InfoComponent } from './intro-info.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [InfoComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: InfoComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [InfoComponent]
19 | })
20 | export class IntroInfoModule {}
21 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-parent.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/intro-parent/intro-parent.component.css
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-parent.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | parent works!
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-parent.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-intro-parent',
5 | templateUrl: './intro-parent.component.html',
6 | styleUrls: ['./intro-parent.component.css']
7 | })
8 | export class ParentComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-parent.module.ts:
--------------------------------------------------------------------------------
1 | import { ParentComponent } from './intro-parent.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [ParentComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: ParentComponent,
15 | children: [
16 | {
17 | path: 'personalize',
18 | loadChildren: './intro-personalize/intro-personalize.module#IntroPersonalizeModule'
19 | },
20 | {
21 | path: 'info',
22 | loadChildren: './intro-info/intro-info.module#IntroInfoModule'
23 | },
24 | {
25 | path: 'reward',
26 | loadChildren: './intro-reward/intro-reward.module#IntroRewardModule'
27 | },
28 | {
29 | path: 'reward/:id',
30 | loadChildren: './intro-reward/intro-reward.module#IntroRewardModule'
31 | }
32 | ]
33 | }
34 | ])
35 | ],
36 | bootstrap: [ParentComponent]
37 | })
38 | export class IntroParentModule {}
39 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-personalize/intro-personalize.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/intro-parent/intro-personalize/intro-personalize.component.css
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-personalize/intro-personalize.component.html:
--------------------------------------------------------------------------------
1 |
2 | personalize works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-personalize/intro-personalize.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-intro-personalize',
5 | templateUrl: './intro-personalize.component.html',
6 | styleUrls: ['./intro-personalize.component.css']
7 | })
8 | export class PersonalizeComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-personalize/intro-personalize.module.ts:
--------------------------------------------------------------------------------
1 | import { PersonalizeComponent } from './intro-personalize.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [PersonalizeComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: PersonalizeComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [PersonalizeComponent]
19 | })
20 | export class IntroPersonalizeModule {}
21 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-reward/intro-reward.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/intro-parent/intro-reward/intro-reward.component.css
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-reward/intro-reward.component.html:
--------------------------------------------------------------------------------
1 |
2 | reward works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-reward/intro-reward.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { RewardComponent } from './intro-reward.component';
4 |
5 | describe('RewardComponent', () => {
6 | let component: RewardComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(
10 | async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [RewardComponent]
13 | }).compileComponents();
14 | })
15 | );
16 |
17 | beforeEach(() => {
18 | fixture = TestBed.createComponent(RewardComponent);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-reward/intro-reward.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-intro-reward',
5 | templateUrl: './intro-reward.component.html',
6 | styleUrls: ['./intro-reward.component.css']
7 | })
8 | export class RewardComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/intro/intro-parent/intro-reward/intro-reward.module.ts:
--------------------------------------------------------------------------------
1 | import { RewardComponent } from './intro-reward.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [RewardComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: RewardComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [RewardComponent]
19 | })
20 | export class IntroRewardModule {}
21 |
--------------------------------------------------------------------------------
/src/app/intro/intro.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/intro.component.css
--------------------------------------------------------------------------------
/src/app/intro/intro.component.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | intro works!
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/app/intro/intro.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { IntroComponent } from './intro.component';
4 |
5 | describe('IntroComponent', () => {
6 | let component: IntroComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(
10 | async(() => {
11 | TestBed.configureTestingModule({
12 | declarations: [IntroComponent]
13 | }).compileComponents();
14 | })
15 | );
16 |
17 | beforeEach(() => {
18 | fixture = TestBed.createComponent(IntroComponent);
19 | component = fixture.componentInstance;
20 | fixture.detectChanges();
21 | });
22 |
23 | it('should create', () => {
24 | expect(component).toBeTruthy();
25 | });
26 | });
27 |
--------------------------------------------------------------------------------
/src/app/intro/intro.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-intro',
5 | templateUrl: './intro.component.html',
6 | styleUrls: ['./intro.component.css']
7 | })
8 | export class IntroComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/intro/intro.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { IntroComponent } from './intro.component';
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [IntroComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: IntroComponent,
15 | children: [
16 | {
17 | path: 'login',
18 | loadChildren: './login/login.module#LoginModule'
19 | },
20 | {
21 | path: 'parent',
22 | loadChildren: './intro-parent/intro-parent.module#IntroParentModule'
23 | }
24 | ]
25 | }
26 | ])
27 | ],
28 | bootstrap: [IntroComponent]
29 | })
30 | export class IntroModule {}
31 |
--------------------------------------------------------------------------------
/src/app/intro/login/login.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/intro/login/login.component.css
--------------------------------------------------------------------------------
/src/app/intro/login/login.component.html:
--------------------------------------------------------------------------------
1 |
2 | login works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/intro/login/login.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { LoginComponent } from './login.component';
4 |
5 | describe('LoginComponent', () => {
6 | let component: LoginComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ LoginComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(LoginComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/intro/login/login.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-login',
5 | templateUrl: './login.component.html',
6 | styleUrls: ['./login.component.css']
7 | })
8 | export class LoginComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/intro/login/login.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { LoginComponent } from './login.component';
6 |
7 | @NgModule({
8 | declarations: [LoginComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: LoginComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [LoginComponent]
19 | })
20 | export class LoginModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/earn/earn.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/earn/earn.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/earn/earn.component.html:
--------------------------------------------------------------------------------
1 |
2 | earn works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/earn/earn.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { EarnComponent } from './earn.component';
4 |
5 | describe('EarnComponent', () => {
6 | let component: EarnComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ EarnComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(EarnComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/earn/earn.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-earn',
5 | templateUrl: './earn.component.html',
6 | styleUrls: ['./earn.component.css']
7 | })
8 | export class EarnComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/earn/earn.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { EarnComponent } from './earn.component';
6 |
7 | @NgModule({
8 | declarations: [EarnComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: EarnComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [EarnComponent]
19 | })
20 | export class EarnModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/friends/friends.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/friends/friends.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/friends/friends.component.html:
--------------------------------------------------------------------------------
1 |
2 | friends works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/friends/friends.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { FriendsComponent } from './friends.component';
4 |
5 | describe('FriendsComponent', () => {
6 | let component: FriendsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ FriendsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(FriendsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/friends/friends.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-friends',
5 | templateUrl: './friends.component.html',
6 | styleUrls: ['./friends.component.css']
7 | })
8 | export class FriendsComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/friends/friends.module.ts:
--------------------------------------------------------------------------------
1 | import { FriendsComponent } from './friends.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [FriendsComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: FriendsComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [FriendsComponent]
19 | })
20 | export class FriendsModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/home/home.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/home/home.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/home/home.component.html:
--------------------------------------------------------------------------------
1 |
2 | home works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/home/home.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { HomeComponent } from './home.component';
4 |
5 | describe('HomeComponent', () => {
6 | let component: HomeComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ HomeComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(HomeComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/home/home.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-home',
5 | templateUrl: './home.component.html',
6 | styleUrls: ['./home.component.css']
7 | })
8 | export class HomeComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/home/home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { HomeComponent } from './home.component';
6 |
7 | @NgModule({
8 | declarations: [HomeComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: HomeComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [HomeComponent]
19 | })
20 | export class HomeModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/kid.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/kid.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/kid.component.html:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 | kid works!
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/src/app/main/kid/kid.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { KidComponent } from './kid.component';
4 |
5 | describe('KidComponent', () => {
6 | let component: KidComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ KidComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(KidComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/kid.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-kid',
5 | templateUrl: './kid.component.html',
6 | styleUrls: ['./kid.component.css']
7 | })
8 | export class KidComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/kid.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { KidComponent } from './kid.component';
6 | import { QuestionComponent } from './question/question.component';
7 | import { FriendsComponent } from './friends/friends.component';
8 | import { ReportsComponent } from './reports/reports.component';
9 |
10 | @NgModule({
11 | declarations: [KidComponent],
12 | imports: [
13 | CommonModule,
14 | RouterModule.forChild([
15 | {
16 | path: '',
17 | component: KidComponent,
18 | children: [
19 | {
20 | path: 'question/:standard/:question/:id',
21 | loadChildren: './question/question.module#QuestionModule'
22 | },
23 | {
24 | path: 'question/:standard/:question',
25 | loadChildren: './question/question.module#QuestionModule'
26 | },
27 | {
28 | path: 'friends',
29 | loadChildren: './friends/friends.module#FriendsModule'
30 | },
31 | {
32 | path: 'reports',
33 | loadChildren: './reports/reports.module#ReportsModule'
34 | },
35 | {
36 | loadChildren: './home/home.module#HomeModule',
37 | path: 'home'
38 | },
39 | {
40 | loadChildren: './earn/earn.module#EarnModule',
41 | path: 'earn'
42 | },
43 | {
44 | loadChildren: './rewards/rewards.module#RewardsModule',
45 | path: 'rewards'
46 | }
47 | ]
48 | }
49 | ])
50 | ],
51 | bootstrap: [KidComponent]
52 | })
53 | export class KidModule {}
54 |
--------------------------------------------------------------------------------
/src/app/main/kid/question/question.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/question/question.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/question/question.component.html:
--------------------------------------------------------------------------------
1 |
2 | question works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/question/question.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { QuestionComponent } from './question.component';
4 |
5 | describe('QuestionComponent', () => {
6 | let component: QuestionComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ QuestionComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(QuestionComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/question/question.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-question',
5 | templateUrl: './question.component.html',
6 | styleUrls: ['./question.component.css']
7 | })
8 | export class QuestionComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/question/question.module.ts:
--------------------------------------------------------------------------------
1 | import { QuestionComponent } from './question.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [QuestionComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: QuestionComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [QuestionComponent]
19 | })
20 | export class QuestionModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/reports/reports.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/reports/reports.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/reports/reports.component.html:
--------------------------------------------------------------------------------
1 |
2 | reports works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/reports/reports.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { ReportsComponent } from './reports.component';
4 |
5 | describe('ReportsComponent', () => {
6 | let component: ReportsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ ReportsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(ReportsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/reports/reports.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-reports',
5 | templateUrl: './reports.component.html',
6 | styleUrls: ['./reports.component.css']
7 | })
8 | export class ReportsComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/reports/reports.module.ts:
--------------------------------------------------------------------------------
1 | import { ReportsComponent } from './reports.component';
2 | import { NgModule } from '@angular/core';
3 | import { RouterModule } from '@angular/router';
4 |
5 | import { CommonModule } from '@angular/common';
6 |
7 | @NgModule({
8 | declarations: [ReportsComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: ReportsComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [ReportsComponent]
19 | })
20 | export class ReportsModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/badges/badges.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/rewards/badges/badges.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/badges/badges.component.html:
--------------------------------------------------------------------------------
1 |
2 | badges works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/badges/badges.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { BadgesComponent } from './badges.component';
4 |
5 | describe('BadgesComponent', () => {
6 | let component: BadgesComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ BadgesComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(BadgesComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/badges/badges.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-badges',
5 | templateUrl: './badges.component.html',
6 | styleUrls: ['./badges.component.css']
7 | })
8 | export class BadgesComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/badges/badges.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { BadgesComponent } from './badges.component';
6 |
7 | @NgModule({
8 | declarations: [BadgesComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: BadgesComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [BadgesComponent]
19 | })
20 | export class BadgesModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/games/games.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/rewards/games/games.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/games/games.component.html:
--------------------------------------------------------------------------------
1 |
2 | games works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/games/games.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { GamesComponent } from './games.component';
4 |
5 | describe('GamesComponent', () => {
6 | let component: GamesComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ GamesComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(GamesComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/games/games.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-games',
5 | templateUrl: './games.component.html',
6 | styleUrls: ['./games.component.css']
7 | })
8 | export class GamesComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/games/games.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { GamesComponent } from './games.component';
6 |
7 | @NgModule({
8 | declarations: [GamesComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: GamesComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [GamesComponent]
19 | })
20 | export class GamesModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/rewards.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/kid/rewards/rewards.component.css
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/rewards.component.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | rewards works!
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/rewards.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { RewardsComponent } from './rewards.component';
4 |
5 | describe('RewardsComponent', () => {
6 | let component: RewardsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ RewardsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(RewardsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/rewards.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-rewards',
5 | templateUrl: './rewards.component.html',
6 | styleUrls: ['./rewards.component.css']
7 | })
8 | export class RewardsComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/kid/rewards/rewards.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { RewardsComponent } from './rewards.component';
6 |
7 | @NgModule({
8 | declarations: [RewardsComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: RewardsComponent,
15 | children: [
16 | {
17 | path: 'games/:id',
18 | loadChildren: './games/games.module#GamesModule'
19 | },
20 | {
21 | path: 'games',
22 | loadChildren: './games/games.module#GamesModule'
23 | },
24 | {
25 | path: 'badges/:id',
26 | loadChildren: './badges/badges.module#BadgesModule'
27 | },
28 | {
29 | path: 'badges',
30 | loadChildren: './badges/badges.module#BadgesModule'
31 | }
32 | ]
33 | }
34 | ])
35 | ],
36 | bootstrap: [RewardsComponent]
37 | })
38 | export class RewardsModule {}
39 |
--------------------------------------------------------------------------------
/src/app/main/main.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/main.component.css
--------------------------------------------------------------------------------
/src/app/main/main.component.html:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 | main works!
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/app/main/main.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { MainComponent } from './main.component';
4 |
5 | describe('MainComponent', () => {
6 | let component: MainComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ MainComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(MainComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/main.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-main',
5 | templateUrl: './main.component.html',
6 | styleUrls: ['./main.component.css']
7 | })
8 | export class MainComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/main.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { MainComponent } from './main.component';
5 | import { CommonModule } from '@angular/common';
6 | import { KidComponent } from './kid/kid.component';
7 | import { ParentComponent } from './parent/parent.component';
8 | import { EarnComponent } from './kid/earn/earn.component';
9 | import { HomeComponent } from './kid/home/home.component';
10 | import { RewardsComponent } from './kid/rewards/rewards.component';
11 |
12 | @NgModule({
13 | declarations: [MainComponent],
14 | imports: [
15 | CommonModule,
16 | RouterModule.forChild([
17 | {
18 | path: '',
19 | component: MainComponent,
20 | children: [
21 | {
22 | path: 'kid',
23 | loadChildren: './kid/kid.module#KidModule'
24 | },
25 | {
26 | path: 'parent',
27 | loadChildren: './parent/parent.module#ParentModule'
28 | }
29 | ]
30 | }
31 | ])
32 | ],
33 | bootstrap: [MainComponent]
34 | })
35 | export class MainModule {}
36 |
--------------------------------------------------------------------------------
/src/app/main/parent/faq/faq.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/parent/faq/faq.component.css
--------------------------------------------------------------------------------
/src/app/main/parent/faq/faq.component.html:
--------------------------------------------------------------------------------
1 |
2 | faq works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/parent/faq/faq.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { FaqComponent } from './faq.component';
4 |
5 | describe('FaqComponent', () => {
6 | let component: FaqComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ FaqComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(FaqComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/parent/faq/faq.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-faq',
5 | templateUrl: './faq.component.html',
6 | styleUrls: ['./faq.component.css']
7 | })
8 | export class FaqComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/parent/faq/faq.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { FaqComponent } from './faq.component';
6 |
7 | @NgModule({
8 | declarations: [FaqComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: FaqComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [FaqComponent]
19 | })
20 | export class FaqModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent-home/home.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { HomeComponent } from './home.component';
4 |
5 | describe('HomeComponent', () => {
6 | let component: HomeComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ HomeComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(HomeComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent-home/parent-home.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/parent/parent-home/parent-home.component.css
--------------------------------------------------------------------------------
/src/app/main/parent/parent-home/parent-home.component.html:
--------------------------------------------------------------------------------
1 |
2 | home works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent-home/parent-home.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-parent-home',
5 | templateUrl: './parent-home.component.html',
6 | styleUrls: ['./parent-home.component.css']
7 | })
8 | export class ParentHomeComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent-home/parent-home.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { ParentHomeComponent } from './parent-home.component';
6 |
7 | @NgModule({
8 | declarations: [ParentHomeComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: ParentHomeComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [ParentHomeComponent]
19 | })
20 | export class ParentHomeModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/parent/parent.component.css
--------------------------------------------------------------------------------
/src/app/main/parent/parent.component.html:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 | parent works!
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { ParentComponent } from './parent.component';
4 |
5 | describe('ParentComponent', () => {
6 | let component: ParentComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ ParentComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(ParentComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-parent',
5 | templateUrl: './parent.component.html',
6 | styleUrls: ['./parent.component.css']
7 | })
8 | export class ParentComponent implements OnInit {
9 | constructor() {}
10 |
11 | ngOnInit() {}
12 | }
13 |
--------------------------------------------------------------------------------
/src/app/main/parent/parent.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { ParentComponent } from './parent.component';
6 | import { SettingsComponent } from './settings/settings.component';
7 | import { VerifyComponent } from './verify/verify.component';
8 | import { FaqComponent } from './faq/faq.component';
9 |
10 | @NgModule({
11 | declarations: [ParentComponent],
12 | imports: [
13 | CommonModule,
14 | RouterModule.forChild([
15 | {
16 | path: '',
17 | component: ParentComponent,
18 | children: [
19 | {
20 | path: 'settings',
21 | loadChildren: './settings/settings.module#SettingsModule'
22 | },
23 | {
24 | path: 'home',
25 | loadChildren: './parent-home/parent-home.module#ParentHomeModule'
26 | },
27 | {
28 | path: 'faq',
29 | loadChildren: './faq/faq.module#FaqModule'
30 | },
31 | {
32 | path: 'verify',
33 | loadChildren: './verify/verify.module#VerifyModule'
34 | }
35 | ]
36 | }
37 | ])
38 | ],
39 | bootstrap: [ParentComponent]
40 | })
41 | export class ParentModule {}
42 |
--------------------------------------------------------------------------------
/src/app/main/parent/settings/settings.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/parent/settings/settings.component.css
--------------------------------------------------------------------------------
/src/app/main/parent/settings/settings.component.html:
--------------------------------------------------------------------------------
1 |
2 | settings works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/parent/settings/settings.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { SettingsComponent } from './settings.component';
4 |
5 | describe('SettingsComponent', () => {
6 | let component: SettingsComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ SettingsComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(SettingsComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/parent/settings/settings.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-settings',
5 | templateUrl: './settings.component.html',
6 | styleUrls: ['./settings.component.css']
7 | })
8 | export class SettingsComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/parent/settings/settings.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { SettingsComponent } from './settings.component';
6 |
7 | @NgModule({
8 | declarations: [SettingsComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: SettingsComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [SettingsComponent]
19 | })
20 | export class SettingsModule {}
21 |
--------------------------------------------------------------------------------
/src/app/main/parent/verify/verify.component.css:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/app/main/parent/verify/verify.component.css
--------------------------------------------------------------------------------
/src/app/main/parent/verify/verify.component.html:
--------------------------------------------------------------------------------
1 |
2 | verify works!
3 |
4 |
--------------------------------------------------------------------------------
/src/app/main/parent/verify/verify.component.spec.ts:
--------------------------------------------------------------------------------
1 | import { async, ComponentFixture, TestBed } from '@angular/core/testing';
2 |
3 | import { VerifyComponent } from './verify.component';
4 |
5 | describe('VerifyComponent', () => {
6 | let component: VerifyComponent;
7 | let fixture: ComponentFixture;
8 |
9 | beforeEach(async(() => {
10 | TestBed.configureTestingModule({
11 | declarations: [ VerifyComponent ]
12 | })
13 | .compileComponents();
14 | }));
15 |
16 | beforeEach(() => {
17 | fixture = TestBed.createComponent(VerifyComponent);
18 | component = fixture.componentInstance;
19 | fixture.detectChanges();
20 | });
21 |
22 | it('should create', () => {
23 | expect(component).toBeTruthy();
24 | });
25 | });
26 |
--------------------------------------------------------------------------------
/src/app/main/parent/verify/verify.component.ts:
--------------------------------------------------------------------------------
1 | import { Component, OnInit } from '@angular/core';
2 |
3 | @Component({
4 | selector: 'app-verify',
5 | templateUrl: './verify.component.html',
6 | styleUrls: ['./verify.component.css']
7 | })
8 | export class VerifyComponent implements OnInit {
9 |
10 | constructor() { }
11 |
12 | ngOnInit() {
13 | }
14 |
15 | }
16 |
--------------------------------------------------------------------------------
/src/app/main/parent/verify/verify.module.ts:
--------------------------------------------------------------------------------
1 | import { NgModule } from '@angular/core';
2 | import { RouterModule } from '@angular/router';
3 |
4 | import { CommonModule } from '@angular/common';
5 | import { VerifyComponent } from './verify.component';
6 |
7 | @NgModule({
8 | declarations: [VerifyComponent],
9 | imports: [
10 | CommonModule,
11 | RouterModule.forChild([
12 | {
13 | path: '',
14 | component: VerifyComponent
15 | }
16 | ])
17 | ],
18 | bootstrap: [VerifyComponent]
19 | })
20 | export class VerifyModule {}
21 |
--------------------------------------------------------------------------------
/src/assets/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/assets/.gitkeep
--------------------------------------------------------------------------------
/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 | #
5 | # For IE 9-11 support, please remove 'not' from the last line of the file and adjust as needed
6 |
7 | > 0.5%
8 | last 2 versions
9 | Firefox ESR
10 | not dead
11 | not IE 9-11
--------------------------------------------------------------------------------
/src/environments/environment.prod.ts:
--------------------------------------------------------------------------------
1 | export const environment = {
2 | production: true
3 | };
4 |
--------------------------------------------------------------------------------
/src/environments/environment.ts:
--------------------------------------------------------------------------------
1 | // This file can be replaced during build by using the `fileReplacements` array.
2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.
3 | // The list of file replacements can be found in `angular.json`.
4 |
5 | export const environment = {
6 | production: false
7 | };
8 |
9 | /*
10 | * For easier debugging in development mode, you can import the following file
11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
12 | *
13 | * This import should be commented out in production mode because it will have a negative impact
14 | * on performance if an error is thrown.
15 | */
16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI.
17 |
--------------------------------------------------------------------------------
/src/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/mgechev/guess-js-angular-demo/25cdf91d8080f9f6eb74205dd0cfa2e3e3e51bcc/src/favicon.ico
--------------------------------------------------------------------------------
/src/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | GuessJsAngularDemo
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/src/karma.conf.js:
--------------------------------------------------------------------------------
1 | // Karma configuration file, see link for more information
2 | // https://karma-runner.github.io/1.0/config/configuration-file.html
3 |
4 | module.exports = function (config) {
5 | config.set({
6 | basePath: '',
7 | frameworks: ['jasmine', '@angular-devkit/build-angular'],
8 | plugins: [
9 | require('karma-jasmine'),
10 | require('karma-chrome-launcher'),
11 | require('karma-jasmine-html-reporter'),
12 | require('karma-coverage-istanbul-reporter'),
13 | require('@angular-devkit/build-angular/plugins/karma')
14 | ],
15 | client: {
16 | clearContext: false // leave Jasmine Spec Runner output visible in browser
17 | },
18 | coverageIstanbulReporter: {
19 | dir: require('path').join(__dirname, '../coverage'),
20 | reports: ['html', 'lcovonly'],
21 | fixWebpackSourcePaths: true
22 | },
23 | reporters: ['progress', 'kjhtml'],
24 | port: 9876,
25 | colors: true,
26 | logLevel: config.LOG_INFO,
27 | autoWatch: true,
28 | browsers: ['Chrome'],
29 | singleRun: false
30 | });
31 | };
--------------------------------------------------------------------------------
/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.error(err));
13 |
--------------------------------------------------------------------------------
/src/polyfills.ts:
--------------------------------------------------------------------------------
1 | /**
2 | * This file includes polyfills needed by Angular and is loaded before the app.
3 | * You can add your own extra polyfills to this file.
4 | *
5 | * This file is divided into 2 sections:
6 | * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
7 | * 2. Application imports. Files imported after ZoneJS that should be loaded before your main
8 | * file.
9 | *
10 | * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
11 | * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
12 | * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
13 | *
14 | * Learn more in https://angular.io/guide/browser-support
15 | */
16 |
17 | /***************************************************************************************************
18 | * BROWSER POLYFILLS
19 | */
20 |
21 | /** IE9, IE10 and IE11 requires all of the following polyfills. **/
22 | // import 'core-js/es6/symbol';
23 | // import 'core-js/es6/object';
24 | // import 'core-js/es6/function';
25 | // import 'core-js/es6/parse-int';
26 | // import 'core-js/es6/parse-float';
27 | // import 'core-js/es6/number';
28 | // import 'core-js/es6/math';
29 | // import 'core-js/es6/string';
30 | // import 'core-js/es6/date';
31 | // import 'core-js/es6/array';
32 | // import 'core-js/es6/regexp';
33 | // import 'core-js/es6/map';
34 | // import 'core-js/es6/weak-map';
35 | // import 'core-js/es6/set';
36 |
37 | /**
38 | * If the application will be indexed by Google Search, the following is required.
39 | * Googlebot uses a renderer based on Chrome 41.
40 | * https://developers.google.com/search/docs/guides/rendering
41 | **/
42 | // import 'core-js/es6/array';
43 |
44 | /** IE10 and IE11 requires the following for NgClass support on SVG elements */
45 | // import 'classlist.js'; // Run `npm install --save classlist.js`.
46 |
47 | /** IE10 and IE11 requires the following for the Reflect API. */
48 | // import 'core-js/es6/reflect';
49 |
50 | /**
51 | * Web Animations `@angular/platform-browser/animations`
52 | * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
53 | * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
54 | **/
55 | // import 'web-animations-js'; // Run `npm install --save web-animations-js`.
56 |
57 | /**
58 | * By default, zone.js will patch all possible macroTask and DomEvents
59 | * user can disable parts of macroTask/DomEvents patch by setting following flags
60 | */
61 |
62 | // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
63 | // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
64 | // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
65 |
66 | /*
67 | * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
68 | * with the following flag, it will bypass `zone.js` patch for IE/Edge
69 | */
70 | // (window as any).__Zone_enable_cross_context_check = true;
71 |
72 | /***************************************************************************************************
73 | * Zone JS is required by default for Angular itself.
74 | */
75 | import 'zone.js/dist/zone'; // Included with Angular CLI.
76 |
77 |
78 | /***************************************************************************************************
79 | * APPLICATION IMPORTS
80 | */
81 |
--------------------------------------------------------------------------------
/src/styles.css:
--------------------------------------------------------------------------------
1 | /* You can add global styles to this file, and also import other style files */
2 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/src/tsconfig.app.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/app",
5 | "types": []
6 | },
7 | "exclude": [
8 | "test.ts",
9 | "**/*.spec.ts"
10 | ]
11 | }
12 |
--------------------------------------------------------------------------------
/src/tsconfig.spec.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "../tsconfig.json",
3 | "compilerOptions": {
4 | "outDir": "../out-tsc/spec",
5 | "types": [
6 | "jasmine",
7 | "node"
8 | ]
9 | },
10 | "files": [
11 | "test.ts",
12 | "polyfills.ts"
13 | ],
14 | "include": [
15 | "**/*.spec.ts",
16 | "**/*.d.ts"
17 | ]
18 | }
19 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compileOnSave": false,
3 | "compilerOptions": {
4 | "baseUrl": "./",
5 | "outDir": "./dist/out-tsc",
6 | "sourceMap": true,
7 | "declaration": false,
8 | "module": "es2015",
9 | "moduleResolution": "node",
10 | "emitDecoratorMetadata": true,
11 | "experimentalDecorators": true,
12 | "target": "es5",
13 | "typeRoots": [
14 | "node_modules/@types"
15 | ],
16 | "lib": [
17 | "es2018",
18 | "dom"
19 | ]
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tslint.json:
--------------------------------------------------------------------------------
1 | {
2 | "rulesDirectory": [
3 | "node_modules/codelyzer"
4 | ],
5 | "rules": {
6 | "arrow-return-shorthand": true,
7 | "callable-types": true,
8 | "class-name": true,
9 | "comment-format": [
10 | true,
11 | "check-space"
12 | ],
13 | "curly": true,
14 | "deprecation": {
15 | "severity": "warn"
16 | },
17 | "eofline": true,
18 | "forin": true,
19 | "import-blacklist": [
20 | true,
21 | "rxjs/Rx"
22 | ],
23 | "import-spacing": true,
24 | "indent": [
25 | true,
26 | "spaces"
27 | ],
28 | "interface-over-type-literal": true,
29 | "label-position": true,
30 | "max-line-length": [
31 | true,
32 | 140
33 | ],
34 | "member-access": false,
35 | "member-ordering": [
36 | true,
37 | {
38 | "order": [
39 | "static-field",
40 | "instance-field",
41 | "static-method",
42 | "instance-method"
43 | ]
44 | }
45 | ],
46 | "no-arg": true,
47 | "no-bitwise": true,
48 | "no-console": [
49 | true,
50 | "debug",
51 | "info",
52 | "time",
53 | "timeEnd",
54 | "trace"
55 | ],
56 | "no-construct": true,
57 | "no-debugger": true,
58 | "no-duplicate-super": true,
59 | "no-empty": false,
60 | "no-empty-interface": true,
61 | "no-eval": true,
62 | "no-inferrable-types": [
63 | true,
64 | "ignore-params"
65 | ],
66 | "no-misused-new": true,
67 | "no-non-null-assertion": true,
68 | "no-redundant-jsdoc": true,
69 | "no-shadowed-variable": true,
70 | "no-string-literal": false,
71 | "no-string-throw": true,
72 | "no-switch-case-fall-through": true,
73 | "no-trailing-whitespace": true,
74 | "no-unnecessary-initializer": true,
75 | "no-unused-expression": true,
76 | "no-use-before-declare": true,
77 | "no-var-keyword": true,
78 | "object-literal-sort-keys": false,
79 | "one-line": [
80 | true,
81 | "check-open-brace",
82 | "check-catch",
83 | "check-else",
84 | "check-whitespace"
85 | ],
86 | "prefer-const": true,
87 | "quotemark": [
88 | true,
89 | "single"
90 | ],
91 | "radix": true,
92 | "semicolon": [
93 | true,
94 | "always"
95 | ],
96 | "triple-equals": [
97 | true,
98 | "allow-null-check"
99 | ],
100 | "typedef-whitespace": [
101 | true,
102 | {
103 | "call-signature": "nospace",
104 | "index-signature": "nospace",
105 | "parameter": "nospace",
106 | "property-declaration": "nospace",
107 | "variable-declaration": "nospace"
108 | }
109 | ],
110 | "unified-signatures": true,
111 | "variable-name": false,
112 | "whitespace": [
113 | true,
114 | "check-branch",
115 | "check-decl",
116 | "check-operator",
117 | "check-separator",
118 | "check-type"
119 | ],
120 | "no-output-on-prefix": true,
121 | "use-input-property-decorator": true,
122 | "use-output-property-decorator": true,
123 | "use-host-property-decorator": true,
124 | "no-input-rename": true,
125 | "no-output-rename": true,
126 | "use-life-cycle-interface": true,
127 | "use-pipe-transform-interface": true,
128 | "component-class-suffix": true,
129 | "directive-class-suffix": true
130 | }
131 | }
132 |
--------------------------------------------------------------------------------