Start Abschnitt 2
This commit is contained in:
parent
ef75ffc72c
commit
7c1c0130a0
43
README.md
43
README.md
@ -25,3 +25,46 @@ sudo apt install nodejs npm
|
||||
sudo npm install -g @angular/cli
|
||||
sudo npm install --save-dev @angular-devkit/build-angular
|
||||
```
|
||||
|
||||
## Getting Started
|
||||
|
||||
Create first project
|
||||
```bash
|
||||
ng new my-first-app --no-strict
|
||||
```
|
||||
|
||||
Select `N` for no routing and normal `CSS`.
|
||||
|
||||
Navigate to the project and spinn up the dev server
|
||||
```bash
|
||||
cd my-fisrt-app
|
||||
gn serve
|
||||
```
|
||||
|
||||
## NgTemplate
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.0.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. Use the `--prod` flag for a production build.
|
||||
|
||||
### 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.
|
||||
|
||||
### 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.
|
@ -1,6 +1,6 @@
|
||||
# Project1
|
||||
# MyFirstApp
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.5.
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.7.
|
||||
|
||||
## Development server
|
||||
|
@ -3,7 +3,7 @@
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"project1": {
|
||||
"my-first-app": {
|
||||
"projectType": "application",
|
||||
"schematics": {},
|
||||
"root": "",
|
||||
@ -13,7 +13,7 @@
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/project1",
|
||||
"outputPath": "dist/my-first-app",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
@ -23,7 +23,6 @@
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"node_module/bootstrap/dist/css/bootstrap.min.css",
|
||||
"src/styles.css"
|
||||
],
|
||||
"scripts": []
|
||||
@ -65,10 +64,10 @@
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "project1:build:production"
|
||||
"browserTarget": "my-first-app:build:production"
|
||||
},
|
||||
"development": {
|
||||
"browserTarget": "project1:build:development"
|
||||
"browserTarget": "my-first-app:build:development"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "development"
|
||||
@ -76,7 +75,7 @@
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "project1:build"
|
||||
"browserTarget": "my-first-app:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
@ -99,5 +98,5 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "project1"
|
||||
"defaultProject": "my-first-app"
|
||||
}
|
@ -25,7 +25,7 @@ module.exports = function (config) {
|
||||
suppressAll: true // removes the duplicated traces
|
||||
},
|
||||
coverageReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/project1'),
|
||||
dir: require('path').join(__dirname, './coverage/my-first-app'),
|
||||
subdir: '.',
|
||||
reporters: [
|
||||
{ type: 'html' },
|
11973
my-first-app/package-lock.json
generated
Normal file
11973
my-first-app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "project1",
|
||||
"name": "my-first-app",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
@ -23,8 +23,8 @@
|
||||
"zone.js": "~0.11.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "~12.2.5",
|
||||
"@angular/cli": "~12.2.5",
|
||||
"@angular-devkit/build-angular": "~12.2.7",
|
||||
"@angular/cli": "~12.2.7",
|
||||
"@angular/compiler-cli": "~12.2.0",
|
||||
"@types/jasmine": "~3.8.0",
|
||||
"@types/node": "^12.11.1",
|
@ -16,16 +16,16 @@ describe('AppComponent', () => {
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'project1'`, () => {
|
||||
it(`should have as title 'my-first-app'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('project1');
|
||||
expect(app.title).toEqual('my-first-app');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement as HTMLElement;
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('project1 app is running!');
|
||||
expect(compiled.querySelector('.content span')?.textContent).toContain('my-first-app app is running!');
|
||||
});
|
||||
});
|
@ -6,5 +6,4 @@ import { Component } from '@angular/core';
|
||||
styleUrls: ['./app.component.css']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'project1';
|
||||
}
|
0
my-first-app/src/assets/.gitkeep
Normal file
0
my-first-app/src/assets/.gitkeep
Normal file
Before Width: | Height: | Size: 948 B After Width: | Height: | Size: 948 B |
@ -2,7 +2,7 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Project1</title>
|
||||
<title>MyFirstApp</title>
|
||||
<base href="/">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
28305
project1/package-lock.json
generated
28305
project1/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,22 +0,0 @@
|
||||
|
||||
<!-- saved from url=(0136)https://a.udemycdn.com/2019-08-23_05-33-38-2ef09f50675d6f46e53be04e6b97b2c8/original.html?nva=20200303175438&token=0771d733e4f2cc8c285b5 -->
|
||||
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1252"></head><body><div style="text-align:center">
|
||||
<h1>
|
||||
Welcome to {{ title }}!
|
||||
</h1>
|
||||
<img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg==">
|
||||
</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/cli">CLI Documentation</a></h2>
|
||||
</li>
|
||||
<li>
|
||||
<h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</body></html>
|
Loading…
Reference in New Issue
Block a user