Initial commit
This commit is contained in:
17
Angular/ToDo-Liste/ToDoList/.browserslistrc
Normal file
17
Angular/ToDo-Liste/ToDoList/.browserslistrc
Normal file
@@ -0,0 +1,17 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
||||
16
Angular/ToDo-Liste/ToDoList/.editorconfig
Normal file
16
Angular/ToDo-Liste/ToDoList/.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
45
Angular/ToDo-Liste/ToDoList/.gitignore
vendored
Normal file
45
Angular/ToDo-Liste/ToDoList/.gitignore
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
27
Angular/ToDo-Liste/ToDoList/README.md
Normal file
27
Angular/ToDo-Liste/ToDoList/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# ToDoList
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||
111
Angular/ToDo-Liste/ToDoList/angular.json
Normal file
111
Angular/ToDo-Liste/ToDoList/angular.json
Normal file
@@ -0,0 +1,111 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"ToDoList": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "sass"
|
||||
},
|
||||
"@schematics/angular:application": {
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/ToDoList",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"inlineStyleLanguage": "sass",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.sass"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ToDoList:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "ToDoList:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "ToDoList:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"inlineStyleLanguage": "sass",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.sass"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "ToDoList"
|
||||
}
|
||||
44
Angular/ToDo-Liste/ToDoList/karma.conf.js
Normal file
44
Angular/ToDo-Liste/ToDoList/karma.conf.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/ToDoList'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
12076
Angular/ToDo-Liste/ToDoList/package-lock.json
generated
Normal file
12076
Angular/ToDo-Liste/ToDoList/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
Angular/ToDo-Liste/ToDoList/package.json
Normal file
39
Angular/ToDo-Liste/ToDoList/package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "to-do-list",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~12.2.0",
|
||||
"@angular/common": "~12.2.0",
|
||||
"@angular/compiler": "~12.2.0",
|
||||
"@angular/core": "~12.2.0",
|
||||
"@angular/forms": "~12.2.0",
|
||||
"@angular/platform-browser": "~12.2.0",
|
||||
"@angular/platform-browser-dynamic": "~12.2.0",
|
||||
"@angular/router": "~12.2.0",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.2.0",
|
||||
"@angular/cli": "~12.2.0",
|
||||
"@angular/compiler-cli": "~12.2.0",
|
||||
"@types/jasmine": "~3.8.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"karma": "~6.3.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"typescript": "~4.3.5"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export interface Eventping {
|
||||
}
|
||||
5
Angular/ToDo-Liste/ToDoList/src/app/_interface/todo.ts
Normal file
5
Angular/ToDo-Liste/ToDoList/src/app/_interface/todo.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
export interface Todo {
|
||||
id: number;
|
||||
label?: string;
|
||||
status: boolean;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { DataService } from './data.service';
|
||||
|
||||
describe('DataService', () => {
|
||||
let service: DataService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(DataService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DataService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
<header>
|
||||
<h1>Do <br> <span>Your</span> <br> Stuff</h1>
|
||||
</header>
|
||||
@@ -0,0 +1,17 @@
|
||||
@import '../../../sass/var'
|
||||
|
||||
header
|
||||
border-top: $cube*0.5 solid $prime
|
||||
width: 100%
|
||||
padding: $cube*2
|
||||
h1
|
||||
font-family: $font1
|
||||
color: $white
|
||||
line-height: 0.8em
|
||||
font-weight: bold
|
||||
font-size: $cube*6
|
||||
text-transform: uppercase
|
||||
margin: 0
|
||||
padding: 0
|
||||
span
|
||||
color: $prime
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TemplateHeaderComponent } from './template-header.component';
|
||||
|
||||
describe('TemplateHeaderComponent', () => {
|
||||
let component: TemplateHeaderComponent;
|
||||
let fixture: ComponentFixture<TemplateHeaderComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TemplateHeaderComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TemplateHeaderComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-template-header',
|
||||
templateUrl: './template-header.component.html',
|
||||
styleUrls: ['./template-header.component.sass']
|
||||
})
|
||||
export class TemplateHeaderComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
<div class="todo-form">
|
||||
<div class="todo-content">
|
||||
<input type="text" placeholder="Name des ToDo-Punktes">
|
||||
</div>
|
||||
<div class="create">
|
||||
<span>Erstellen</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,47 @@
|
||||
@import '../../../sass/var'
|
||||
|
||||
.todo-form
|
||||
width: 100%
|
||||
background-color: $white
|
||||
margin: 0 0 $cube*2 0
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: space-between
|
||||
align-items: stretch
|
||||
height: $cube*8
|
||||
cursor: grab
|
||||
.todo-content
|
||||
width: 100%
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: flex-start
|
||||
align-items: stretch
|
||||
input
|
||||
font-family: $font2
|
||||
font-size: $cube*2
|
||||
padding: $cube*2
|
||||
color: $second
|
||||
background-color: $white
|
||||
width: 100%
|
||||
border: none
|
||||
word-break: break-word
|
||||
input::placeholder
|
||||
opacity: 0.5
|
||||
font-style: italic
|
||||
color: $second
|
||||
input:focus
|
||||
outline: none
|
||||
.create
|
||||
color: $white
|
||||
font-family: $font2
|
||||
font-size: $cube*2
|
||||
padding: $cube*2
|
||||
cursor: pointer
|
||||
background-color: $prime
|
||||
span
|
||||
height: 100%
|
||||
width: 100%
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: center
|
||||
align-items: center
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TemplateTodoFormComponent } from './template-todo-form.component';
|
||||
|
||||
describe('TemplateTodoFormComponent', () => {
|
||||
let component: TemplateTodoFormComponent;
|
||||
let fixture: ComponentFixture<TemplateTodoFormComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TemplateTodoFormComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TemplateTodoFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-template-todo-form',
|
||||
templateUrl: './template-todo-form.component.html',
|
||||
styleUrls: ['./template-todo-form.component.sass']
|
||||
})
|
||||
export class TemplateTodoFormComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
<div class="todo">
|
||||
<div class="todo-content">
|
||||
<div class="handle"></div>
|
||||
<div class="todo-content-check">
|
||||
<img src="./assets/svg/checkbox-empty.svg">
|
||||
<img src="./assets/svg/checkbox-done.svg">
|
||||
</div>
|
||||
<div class="todo-content-titel">
|
||||
<input type="text" placeholder="Name des ToDo-Punktes">
|
||||
</div>
|
||||
</div>
|
||||
<div class="delete">
|
||||
<span>Löschen</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,81 @@
|
||||
@import '../../../sass/var'
|
||||
|
||||
// ##########################################################
|
||||
// ##########################################################
|
||||
// ##########################################################
|
||||
|
||||
.todo
|
||||
width: 100%
|
||||
background-color: $white
|
||||
margin: 0 0 $cube 0
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: space-between
|
||||
align-items: stretch
|
||||
height: 100%
|
||||
.todo-content
|
||||
width: 100%
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: flex-start
|
||||
align-items: center
|
||||
.handle
|
||||
background-color: $prime
|
||||
height: 100%
|
||||
display: flex
|
||||
flex-flow: row
|
||||
padding: 0 $cube*2 0 $cube*2
|
||||
justify-content: center
|
||||
align-items: center
|
||||
cursor: grab
|
||||
background-image: url('../../../assets/svg/drag.svg')
|
||||
background-position: center center
|
||||
background-repeat: no-repeat
|
||||
background-size: $cube*2 $cube*2
|
||||
.todo-content-check
|
||||
display: flex
|
||||
margin: $cube*2
|
||||
flex-flow: row
|
||||
justify-content: center
|
||||
align-items: center
|
||||
cursor: pointer
|
||||
img
|
||||
width: $cube*4
|
||||
height: $cube*4
|
||||
.todo-content-titel
|
||||
width: 100%
|
||||
input
|
||||
font-family: $font2
|
||||
font-size: $cube*2
|
||||
padding: $cube*2
|
||||
color: $second
|
||||
width: 100%
|
||||
border: none
|
||||
word-break: break-word
|
||||
input::placeholder
|
||||
opacity: 0.5
|
||||
font-style: italic
|
||||
input:focus
|
||||
outline: none
|
||||
.delete
|
||||
background-color: $red
|
||||
color: $white
|
||||
font-family: $font2
|
||||
font-size: $cube*2
|
||||
padding: $cube*2
|
||||
cursor: pointer
|
||||
span
|
||||
height: 100%
|
||||
width: 100%
|
||||
display: flex
|
||||
flex-flow: row
|
||||
justify-content: center
|
||||
align-items: center
|
||||
.todo.done
|
||||
.todo-content
|
||||
.handle
|
||||
display: none
|
||||
.todo-content-titel
|
||||
input
|
||||
opacity: 0.3
|
||||
text-decoration: line-through
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TemplateTodoComponent } from './template-todo.component';
|
||||
|
||||
describe('TemplateTodoComponent', () => {
|
||||
let component: TemplateTodoComponent;
|
||||
let fixture: ComponentFixture<TemplateTodoComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TemplateTodoComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TemplateTodoComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-template-todo',
|
||||
templateUrl: './template-todo.component.html',
|
||||
styleUrls: ['./template-todo.component.sass']
|
||||
})
|
||||
export class TemplateTodoComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
1
Angular/ToDo-Liste/ToDoList/src/app/app.component.html
Normal file
1
Angular/ToDo-Liste/ToDoList/src/app/app.component.html
Normal file
@@ -0,0 +1 @@
|
||||
<app-page-list></app-page-list>
|
||||
31
Angular/ToDo-Liste/ToDoList/src/app/app.component.spec.ts
Normal file
31
Angular/ToDo-Liste/ToDoList/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'ToDoList'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('ToDoList');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('ToDoList app is running!');
|
||||
});
|
||||
});
|
||||
10
Angular/ToDo-Liste/ToDoList/src/app/app.component.ts
Normal file
10
Angular/ToDo-Liste/ToDoList/src/app/app.component.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.sass']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'ToDoList';
|
||||
}
|
||||
24
Angular/ToDo-Liste/ToDoList/src/app/app.module.ts
Normal file
24
Angular/ToDo-Liste/ToDoList/src/app/app.module.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { PageListComponent } from './page-list/page-list.component';
|
||||
import { TemplateTodoComponent } from './_template/template-todo/template-todo.component';
|
||||
import { TemplateTodoFormComponent } from './_template/template-todo-form/template-todo-form.component';
|
||||
import { TemplateHeaderComponent } from './_template/template-header/template-header.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
PageListComponent,
|
||||
TemplateTodoComponent,
|
||||
TemplateTodoFormComponent,
|
||||
TemplateHeaderComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
@@ -0,0 +1,17 @@
|
||||
<app-template-header></app-template-header>
|
||||
<div class="list-view">
|
||||
<h4>Offen <span>( 2 )</span></h4>
|
||||
<div class="todo-elements">
|
||||
<app-template-todo></app-template-todo>
|
||||
<app-template-todo></app-template-todo>
|
||||
<app-template-todo></app-template-todo>
|
||||
<app-template-todo></app-template-todo>
|
||||
<app-template-todo></app-template-todo>
|
||||
<app-template-todo></app-template-todo>
|
||||
</div>
|
||||
<app-template-todo-form></app-template-todo-form>
|
||||
<h4>Erledigt <span>( 2 )</span></h4>
|
||||
<div class="todo-elements">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,23 @@
|
||||
@import '../../sass/var'
|
||||
|
||||
.list-view
|
||||
width: 100%
|
||||
padding: $cube*2
|
||||
h4
|
||||
font-family: $font1
|
||||
color: $white
|
||||
font-size: $cube*3
|
||||
margin: 0 0 $cube*2 0
|
||||
padding: 0
|
||||
font-weight: regular
|
||||
transition: all 250ms
|
||||
cursor: pointer
|
||||
span
|
||||
font-size: $cube*1.5
|
||||
h4:hover
|
||||
color: $prime
|
||||
.todo-elements
|
||||
width: 100%
|
||||
margin: 0
|
||||
display: flex
|
||||
flex-flow: column
|
||||
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { PageListComponent } from './page-list.component';
|
||||
|
||||
describe('PageListComponent', () => {
|
||||
let component: PageListComponent;
|
||||
let fixture: ComponentFixture<PageListComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ PageListComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(PageListComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-page-list',
|
||||
templateUrl: './page-list.component.html',
|
||||
styleUrls: ['./page-list.component.sass']
|
||||
})
|
||||
export class PageListComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
0
Angular/ToDo-Liste/ToDoList/src/assets/.gitkeep
Normal file
0
Angular/ToDo-Liste/ToDoList/src/assets/.gitkeep
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Black.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Black.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Bold.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Bold.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Italic.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Italic.ttf
Normal file
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Light.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Light.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Medium.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Medium.ttf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Regular.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Regular.ttf
Normal file
Binary file not shown.
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Thin.ttf
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/assets/fonts/Roboto-Thin.ttf
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30
Angular/ToDo-Liste/ToDoList/src/assets/svg/checkbox-done.svg
Normal file
30
Angular/ToDo-Liste/ToDoList/src/assets/svg/checkbox-done.svg
Normal file
@@ -0,0 +1,30 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 40.691">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1, .cls-2, .cls-4 {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.cls-1, .cls-2 {
|
||||
stroke: #6ae2d6;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
stroke-width: 5px;
|
||||
}
|
||||
|
||||
.cls-3 {
|
||||
stroke: none;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Gruppe_3" data-name="Gruppe 3" transform="translate(-60 -238.309)">
|
||||
<g id="Rechteck_3" data-name="Rechteck 3" class="cls-1" transform="translate(60 242)">
|
||||
<rect class="cls-3" width="37" height="37" rx="10"/>
|
||||
<rect class="cls-4" x="0.5" y="0.5" width="36" height="36" rx="9.5"/>
|
||||
</g>
|
||||
<path id="Pfad_2" data-name="Pfad 2" class="cls-2" d="M68.664,258.959,80,269.326l12.245-30.075"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 813 B |
@@ -0,0 +1,25 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 37">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1, .cls-3 {
|
||||
fill: none;
|
||||
}
|
||||
|
||||
.cls-1 {
|
||||
stroke: #6ae2d6;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
}
|
||||
|
||||
.cls-2 {
|
||||
stroke: none;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Gruppe_3" data-name="Gruppe 3" transform="translate(-60 -242)">
|
||||
<g id="Rechteck_3" data-name="Rechteck 3" class="cls-1" transform="translate(60 242)">
|
||||
<rect class="cls-2" width="37" height="37" rx="10"/>
|
||||
<rect class="cls-3" x="0.5" y="0.5" width="36" height="36" rx="9.5"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 636 B |
21
Angular/ToDo-Liste/ToDoList/src/assets/svg/drag.svg
Normal file
21
Angular/ToDo-Liste/ToDoList/src/assets/svg/drag.svg
Normal file
@@ -0,0 +1,21 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11.947 19.682">
|
||||
<defs>
|
||||
<style>
|
||||
.cls-1 {
|
||||
fill: #4ea89f;
|
||||
}
|
||||
</style>
|
||||
</defs>
|
||||
<g id="Gruppe_6" data-name="Gruppe 6" transform="translate(-28.053 -251.159)">
|
||||
<g id="Gruppe_4" data-name="Gruppe 4" transform="translate(-1.947 9.159)">
|
||||
<circle id="Ellipse_1" data-name="Ellipse 1" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 242)"/>
|
||||
<circle id="Ellipse_2" data-name="Ellipse 2" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 249.526)"/>
|
||||
<circle id="Ellipse_3" data-name="Ellipse 3" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 257.051)"/>
|
||||
</g>
|
||||
<g id="Gruppe_5" data-name="Gruppe 5" transform="translate(5.369 9.159)">
|
||||
<circle id="Ellipse_1-2" data-name="Ellipse 1" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 242)"/>
|
||||
<circle id="Ellipse_2-2" data-name="Ellipse 2" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 249.526)"/>
|
||||
<circle id="Ellipse_3-2" data-name="Ellipse 3" class="cls-1" cx="2.316" cy="2.316" r="2.316" transform="translate(30 257.051)"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
||||
16
Angular/ToDo-Liste/ToDoList/src/environments/environment.ts
Normal file
16
Angular/ToDo-Liste/ToDoList/src/environments/environment.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||
BIN
Angular/ToDo-Liste/ToDoList/src/favicon.ico
Normal file
BIN
Angular/ToDo-Liste/ToDoList/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
13
Angular/ToDo-Liste/ToDoList/src/index.html
Normal file
13
Angular/ToDo-Liste/ToDoList/src/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>ToDoList</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
12
Angular/ToDo-Liste/ToDoList/src/main.ts
Normal file
12
Angular/ToDo-Liste/ToDoList/src/main.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
65
Angular/ToDo-Liste/ToDoList/src/polyfills.ts
Normal file
65
Angular/ToDo-Liste/ToDoList/src/polyfills.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/**
|
||||
* IE11 requires the following for NgClass support on SVG elements
|
||||
*/
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
11
Angular/ToDo-Liste/ToDoList/src/sass/_var.sass
Normal file
11
Angular/ToDo-Liste/ToDoList/src/sass/_var.sass
Normal file
@@ -0,0 +1,11 @@
|
||||
$prime: #6ae2d6
|
||||
$prime-dark: #4ea89f
|
||||
$second: #374855
|
||||
$grey: #e8e8e8
|
||||
$red: #e16c6c
|
||||
$white: #ffffff
|
||||
|
||||
$cube: 1rem
|
||||
|
||||
$font1: "Roboto Condensed", sans-serif
|
||||
$font2: "Roboto", sans-serif
|
||||
35
Angular/ToDo-Liste/ToDoList/src/styles.sass
Normal file
35
Angular/ToDo-Liste/ToDoList/src/styles.sass
Normal file
@@ -0,0 +1,35 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
@font-face
|
||||
font-family: "Roboto"
|
||||
src: url('./assets/fonts/Roboto-Regular.ttf') format("truetype")
|
||||
font-weight: regular
|
||||
|
||||
@font-face
|
||||
font-family: "Roboto"
|
||||
src: url('./assets/fonts/Roboto-Bold.ttf') format("truetype")
|
||||
font-weight: bold
|
||||
|
||||
@font-face
|
||||
font-family: "Roboto Condensed"
|
||||
src: url('./assets/fonts/RobotoCondensed-Regular.ttf') format("truetype")
|
||||
font-weight: regular
|
||||
|
||||
@font-face
|
||||
font-family: "Roboto Condensed"
|
||||
src: url('./assets/fonts/RobotoCondensed-Bold.ttf') format("truetype")
|
||||
font-weight: bold
|
||||
|
||||
@import './sass/var'
|
||||
|
||||
::selection
|
||||
background-color: $prime
|
||||
color: $white
|
||||
|
||||
*
|
||||
box-sizing: border-box
|
||||
|
||||
body, html
|
||||
margin: 0
|
||||
padding: 0
|
||||
font-size: 10px
|
||||
background-color: $second
|
||||
27
Angular/ToDo-Liste/ToDoList/src/test.ts
Normal file
27
Angular/ToDo-Liste/ToDoList/src/test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
||||
keys(): string[];
|
||||
<T>(id: string): T;
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting(),
|
||||
{ teardown: { destroyAfterEach: true }},
|
||||
);
|
||||
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
15
Angular/ToDo-Liste/ToDoList/tsconfig.app.json
Normal file
15
Angular/ToDo-Liste/ToDoList/tsconfig.app.json
Normal file
@@ -0,0 +1,15 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
30
Angular/ToDo-Liste/ToDoList/tsconfig.json
Normal file
30
Angular/ToDo-Liste/ToDoList/tsconfig.json
Normal file
@@ -0,0 +1,30 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2017",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
18
Angular/ToDo-Liste/ToDoList/tsconfig.spec.json
Normal file
18
Angular/ToDo-Liste/ToDoList/tsconfig.spec.json
Normal file
@@ -0,0 +1,18 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
17
Angular/Tutorial/.browserslistrc
Normal file
17
Angular/Tutorial/.browserslistrc
Normal file
@@ -0,0 +1,17 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# For the full list of supported browsers by the Angular framework, please see:
|
||||
# https://angular.io/guide/browser-support
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
last 1 Chrome version
|
||||
last 1 Firefox version
|
||||
last 2 Edge major versions
|
||||
last 2 Safari major versions
|
||||
last 2 iOS major versions
|
||||
Firefox ESR
|
||||
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
|
||||
16
Angular/Tutorial/.editorconfig
Normal file
16
Angular/Tutorial/.editorconfig
Normal file
@@ -0,0 +1,16 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
45
Angular/Tutorial/.gitignore
vendored
Normal file
45
Angular/Tutorial/.gitignore
vendored
Normal file
@@ -0,0 +1,45 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events*.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
27
Angular/Tutorial/README.md
Normal file
27
Angular/Tutorial/README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Tutorial
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
|
||||
106
Angular/Tutorial/angular.json
Normal file
106
Angular/Tutorial/angular.json
Normal file
@@ -0,0 +1,106 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"Tutorial": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:application": {
|
||||
"strict": true
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/Tutorial",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "500kb",
|
||||
"maximumError": "1mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "2kb",
|
||||
"maximumError": "4kb"
|
||||
}
|
||||
],
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"outputHashing": "all"
|
||||
},
|
||||
"development": {
|
||||
"buildOptimizer": false,
|
||||
"optimization": false,
|
||||
"vendorChunk": true,
|
||||
"extractLicenses": false,
|
||||
"sourceMap": true,
|
||||
"namedChunks": true
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production"
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "Tutorial:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "Tutorial:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "Tutorial:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "Tutorial"
|
||||
}
|
||||
44
Angular/Tutorial/karma.conf.js
Normal file
44
Angular/Tutorial/karma.conf.js
Normal file
@@ -0,0 +1,44 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
jasmine: {
|
||||
// you can add configuration options for Jasmine here
|
||||
// the possible options are listed at https://jasmine.github.io/api/edge/Configuration.html
|
||||
// for example, you can disable the random execution with `random: false`
|
||||
// or set a specific seed with `seed: 4321`
|
||||
},
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
jasmineHtmlReporter: {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/Tutorial'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
||||
{ type: 'text-summary' }
|
||||
]
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
12076
Angular/Tutorial/package-lock.json
generated
Normal file
12076
Angular/Tutorial/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
39
Angular/Tutorial/package.json
Normal file
39
Angular/Tutorial/package.json
Normal file
@@ -0,0 +1,39 @@
|
||||
{
|
||||
"name": "tutorial",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"watch": "ng build --watch --configuration development",
|
||||
"test": "ng test"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~12.2.0",
|
||||
"@angular/common": "~12.2.0",
|
||||
"@angular/compiler": "~12.2.0",
|
||||
"@angular/core": "~12.2.0",
|
||||
"@angular/forms": "~12.2.0",
|
||||
"@angular/platform-browser": "~12.2.0",
|
||||
"@angular/platform-browser-dynamic": "~12.2.0",
|
||||
"@angular/router": "~12.2.0",
|
||||
"rxjs": "~6.6.0",
|
||||
"tslib": "^2.3.0",
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.2.0",
|
||||
"@angular/cli": "~12.2.0",
|
||||
"@angular/compiler-cli": "~12.2.0",
|
||||
"@types/jasmine": "~3.8.0",
|
||||
"@types/node": "^12.11.1",
|
||||
"jasmine-core": "~3.8.0",
|
||||
"karma": "~6.3.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage": "~2.0.3",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "~1.7.0",
|
||||
"typescript": "~4.3.5"
|
||||
}
|
||||
}
|
||||
0
Angular/Tutorial/src/app/app.component.css
Normal file
0
Angular/Tutorial/src/app/app.component.css
Normal file
10
Angular/Tutorial/src/app/app.component.html
Normal file
10
Angular/Tutorial/src/app/app.component.html
Normal file
@@ -0,0 +1,10 @@
|
||||
<app-test></app-test>
|
||||
<div>
|
||||
<h1>Welcome to {{title}}</h1>
|
||||
</div>
|
||||
<h2>Here are some links to help you start: </h2>
|
||||
<ul>
|
||||
<li><h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2></li>
|
||||
<li><h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">CLI Documentation</a></h2></li>
|
||||
<li><h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Angular blog</a></h2></li>
|
||||
</ul>
|
||||
31
Angular/Tutorial/src/app/app.component.spec.ts
Normal file
31
Angular/Tutorial/src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,31 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
});
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'Tutorial'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('Tutorial');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('Tutorial app is running!');
|
||||
});
|
||||
});
|
||||
10
Angular/Tutorial/src/app/app.component.ts
Normal file
10
Angular/Tutorial/src/app/app.component.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'Tutorial';
|
||||
}
|
||||
24
Angular/Tutorial/src/app/app.module.ts
Normal file
24
Angular/Tutorial/src/app/app.module.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { HttpClientModule } from "@angular/common/http";
|
||||
|
||||
import { AppComponent } from './app.component';
|
||||
import { VideoComponent } from './video/video.component';
|
||||
import { TestComponent } from './test/test.component';
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
VideoComponent,
|
||||
TestComponent
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
FormsModule,
|
||||
HttpClientModule
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
30
Angular/Tutorial/src/app/test/test.component.css
Normal file
30
Angular/Tutorial/src/app/test/test.component.css
Normal file
@@ -0,0 +1,30 @@
|
||||
.register {
|
||||
width: 800px;
|
||||
height: 600px;
|
||||
background-color: gray;
|
||||
position: relative;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-family: "Cooper Black", sans-serif;
|
||||
font-size: 50px;
|
||||
margin-left: 300px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 500px;
|
||||
height: 50px;
|
||||
margin-left: 150px;
|
||||
margin-top: 50px;
|
||||
font-size: 40px;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 200px;
|
||||
height: 40px;
|
||||
margin-top: 100px;
|
||||
margin-left: 300px;
|
||||
font-size: 25px;
|
||||
}
|
||||
6
Angular/Tutorial/src/app/test/test.component.html
Normal file
6
Angular/Tutorial/src/app/test/test.component.html
Normal file
@@ -0,0 +1,6 @@
|
||||
<div class="register">
|
||||
<h1>Register</h1>
|
||||
<input class="email" type="email" placeholder="E-Mail" id="email">
|
||||
<input class="password" type="password" placeholder="Password" id="pass">
|
||||
<button class="submit" (click)="onRegisterClick()">Register</button>
|
||||
</div>
|
||||
25
Angular/Tutorial/src/app/test/test.component.spec.ts
Normal file
25
Angular/Tutorial/src/app/test/test.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestComponent } from './test.component';
|
||||
|
||||
describe('TestComponent', () => {
|
||||
let component: TestComponent;
|
||||
let fixture: ComponentFixture<TestComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ TestComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
24
Angular/Tutorial/src/app/test/test.component.ts
Normal file
24
Angular/Tutorial/src/app/test/test.component.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-test',
|
||||
templateUrl: './test.component.html',
|
||||
styleUrls: ['./test.component.css']
|
||||
})
|
||||
export class TestComponent implements OnInit {
|
||||
email: string = "leon@ladenbau-hoppe.de";
|
||||
pass: string = "1234567890";
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
onRegisterClick(): void {
|
||||
const email = document.getElementById("email") as HTMLInputElement;
|
||||
const password = document.getElementById("pass") as HTMLInputElement;
|
||||
if (email.value == this.email && password.value == this.pass) {
|
||||
window.alert("Erfolgreich eingeloggt!");
|
||||
}
|
||||
}
|
||||
}
|
||||
0
Angular/Tutorial/src/app/video/video.component.css
Normal file
0
Angular/Tutorial/src/app/video/video.component.css
Normal file
1
Angular/Tutorial/src/app/video/video.component.html
Normal file
1
Angular/Tutorial/src/app/video/video.component.html
Normal file
@@ -0,0 +1 @@
|
||||
<p (click)="clickHandler()">Hello Angular!</p>
|
||||
25
Angular/Tutorial/src/app/video/video.component.spec.ts
Normal file
25
Angular/Tutorial/src/app/video/video.component.spec.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { VideoComponent } from './video.component';
|
||||
|
||||
describe('VideoComponent', () => {
|
||||
let component: VideoComponent;
|
||||
let fixture: ComponentFixture<VideoComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
declarations: [ VideoComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(VideoComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
15
Angular/Tutorial/src/app/video/video.component.ts
Normal file
15
Angular/Tutorial/src/app/video/video.component.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { Component, OnInit, Input } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-video',
|
||||
templateUrl: './video.component.html',
|
||||
styleUrls: ['./video.component.css']
|
||||
})
|
||||
export class VideoComponent implements OnInit {
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void { }
|
||||
|
||||
clickHandler(): void {
|
||||
}
|
||||
}
|
||||
0
Angular/Tutorial/src/assets/.gitkeep
Normal file
0
Angular/Tutorial/src/assets/.gitkeep
Normal file
3
Angular/Tutorial/src/environments/environment.prod.ts
Normal file
3
Angular/Tutorial/src/environments/environment.prod.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
export const environment = {
|
||||
production: true
|
||||
};
|
||||
16
Angular/Tutorial/src/environments/environment.ts
Normal file
16
Angular/Tutorial/src/environments/environment.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// This file can be replaced during build by using the `fileReplacements` array.
|
||||
// `ng build` replaces `environment.ts` with `environment.prod.ts`.
|
||||
// The list of file replacements can be found in `angular.json`.
|
||||
|
||||
export const environment = {
|
||||
production: false
|
||||
};
|
||||
|
||||
/*
|
||||
* For easier debugging in development mode, you can import the following file
|
||||
* to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
|
||||
*
|
||||
* This import should be commented out in production mode because it will have a negative impact
|
||||
* on performance if an error is thrown.
|
||||
*/
|
||||
// import 'zone.js/plugins/zone-error'; // Included with Angular CLI.
|
||||
BIN
Angular/Tutorial/src/favicon.ico
Normal file
BIN
Angular/Tutorial/src/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 948 B |
13
Angular/Tutorial/src/index.html
Normal file
13
Angular/Tutorial/src/index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Tutorial</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
||||
</head>
|
||||
<body>
|
||||
<app-root></app-root>
|
||||
</body>
|
||||
</html>
|
||||
12
Angular/Tutorial/src/main.ts
Normal file
12
Angular/Tutorial/src/main.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import { enableProdMode } from '@angular/core';
|
||||
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
||||
|
||||
import { AppModule } from './app/app.module';
|
||||
import { environment } from './environments/environment';
|
||||
|
||||
if (environment.production) {
|
||||
enableProdMode();
|
||||
}
|
||||
|
||||
platformBrowserDynamic().bootstrapModule(AppModule)
|
||||
.catch(err => console.error(err));
|
||||
65
Angular/Tutorial/src/polyfills.ts
Normal file
65
Angular/Tutorial/src/polyfills.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* This file includes polyfills needed by Angular and is loaded before the app.
|
||||
* You can add your own extra polyfills to this file.
|
||||
*
|
||||
* This file is divided into 2 sections:
|
||||
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
||||
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
|
||||
* file.
|
||||
*
|
||||
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
||||
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
||||
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
|
||||
*
|
||||
* Learn more in https://angular.io/guide/browser-support
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* BROWSER POLYFILLS
|
||||
*/
|
||||
|
||||
/**
|
||||
* IE11 requires the following for NgClass support on SVG elements
|
||||
*/
|
||||
// import 'classlist.js'; // Run `npm install --save classlist.js`.
|
||||
|
||||
/**
|
||||
* Web Animations `@angular/platform-browser/animations`
|
||||
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
|
||||
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
|
||||
*/
|
||||
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
||||
|
||||
/**
|
||||
* By default, zone.js will patch all possible macroTask and DomEvents
|
||||
* user can disable parts of macroTask/DomEvents patch by setting following flags
|
||||
* because those flags need to be set before `zone.js` being loaded, and webpack
|
||||
* will put import in the top of bundle, so user need to create a separate file
|
||||
* in this directory (for example: zone-flags.ts), and put the following flags
|
||||
* into that file, and then add the following code before importing zone.js.
|
||||
* import './zone-flags';
|
||||
*
|
||||
* The flags allowed in zone-flags.ts are listed here.
|
||||
*
|
||||
* The following flags will work for all browsers.
|
||||
*
|
||||
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
|
||||
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
|
||||
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
|
||||
*
|
||||
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
|
||||
* with the following flag, it will bypass `zone.js` patch for IE/Edge
|
||||
*
|
||||
* (window as any).__Zone_enable_cross_context_check = true;
|
||||
*
|
||||
*/
|
||||
|
||||
/***************************************************************************************************
|
||||
* Zone JS is required by default for Angular itself.
|
||||
*/
|
||||
import 'zone.js'; // Included with Angular CLI.
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
* APPLICATION IMPORTS
|
||||
*/
|
||||
1
Angular/Tutorial/src/styles.css
Normal file
1
Angular/Tutorial/src/styles.css
Normal file
@@ -0,0 +1 @@
|
||||
/* You can add global styles to this file, and also import other style files */
|
||||
27
Angular/Tutorial/src/test.ts
Normal file
27
Angular/Tutorial/src/test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
|
||||
|
||||
import 'zone.js/testing';
|
||||
import { getTestBed } from '@angular/core/testing';
|
||||
import {
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting
|
||||
} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
declare const require: {
|
||||
context(path: string, deep?: boolean, filter?: RegExp): {
|
||||
keys(): string[];
|
||||
<T>(id: string): T;
|
||||
};
|
||||
};
|
||||
|
||||
// First, initialize the Angular testing environment.
|
||||
getTestBed().initTestEnvironment(
|
||||
BrowserDynamicTestingModule,
|
||||
platformBrowserDynamicTesting(),
|
||||
{ teardown: { destroyAfterEach: true }},
|
||||
);
|
||||
|
||||
// Then we find all the tests.
|
||||
const context = require.context('./', true, /\.spec\.ts$/);
|
||||
// And load the modules.
|
||||
context.keys().map(context);
|
||||
15
Angular/Tutorial/tsconfig.app.json
Normal file
15
Angular/Tutorial/tsconfig.app.json
Normal file
@@ -0,0 +1,15 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"files": [
|
||||
"src/main.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
30
Angular/Tutorial/tsconfig.json
Normal file
30
Angular/Tutorial/tsconfig.json
Normal file
@@ -0,0 +1,30 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"compileOnSave": false,
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "./dist/out-tsc",
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"strict": true,
|
||||
"noImplicitReturns": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"sourceMap": true,
|
||||
"declaration": false,
|
||||
"downlevelIteration": true,
|
||||
"experimentalDecorators": true,
|
||||
"moduleResolution": "node",
|
||||
"importHelpers": true,
|
||||
"target": "es2017",
|
||||
"module": "es2020",
|
||||
"lib": [
|
||||
"es2018",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"enableI18nLegacyMessageIdFormat": false,
|
||||
"strictInjectionParameters": true,
|
||||
"strictInputAccessModifiers": true,
|
||||
"strictTemplates": true
|
||||
}
|
||||
}
|
||||
18
Angular/Tutorial/tsconfig.spec.json
Normal file
18
Angular/Tutorial/tsconfig.spec.json
Normal file
@@ -0,0 +1,18 @@
|
||||
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./out-tsc/spec",
|
||||
"types": [
|
||||
"jasmine"
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts",
|
||||
"src/polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.spec.ts",
|
||||
"src/**/*.d.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user