Skip to content

Commit d9fd76d

Browse files
committed
Tuning updates
1 parent d4bfdb1 commit d9fd76d

5 files changed

Lines changed: 18 additions & 3 deletions

File tree

.vscode/launch.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4+
// Based on: https://github.com/microsoft/vscode-recipes/tree/master/Angular-CLI
45
{
56
"name": "Launch ng serve & Chrome",
67
"type": "chrome",
78
"request": "launch",
89
"preLaunchTask": "npm: start",
910
"url": "http://localhost:4200/#",
11+
12+
// Note: The ./client directory
1013
"webRoot": "${workspaceFolder}/client",
14+
1115
"sourceMaps": true,
1216
"sourceMapPathOverrides": {
1317
"webpack:/*": "${webRoot}/*",

.vscode/tasks.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@
3232
}
3333
}
3434
},
35+
3536
"options": {
37+
// Note: The ./client directory
3638
"cwd": "${workspaceFolder}/client"
3739
},
40+
3841
},
3942
]
4043
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Debugging Angular with Visual Studio Code.
1818
The app generation is based on https://angular.io/guide/setup-local.
1919

2020
* Run `npm install -g @angular/cli` - Install the app generator CLI tool.
21-
* Run `ng new client` - Generate an application.
21+
* Run `ng new client` - Generate an application, I named it `client`.
2222
* Run `cd client` - Change directory to the app.
2323
* Run `ng serve --open` - Started the server and open Chrome.
2424

@@ -32,7 +32,7 @@ The app generation is based on https://angular.io/guide/setup-local.
3232
1. [launch.json](./.vscode/launch.json)
3333
2. [tasks.json](./.vscode/tasks.json)
3434

35-
### Launchers
35+
### Run Launchers
3636
Launching and debugging in chrome will allow you to use break points in the source code.
3737
The launchers are based on https://github.com/microsoft/vscode-recipes/tree/master/Angular-CLI.
3838

client/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",
7+
"dev": "ng serve --open",
78
"build": "ng build",
89
"test": "ng test",
910
"lint": "ng lint",

client/src/app/app.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ export class AppComponent {
99
title = 'client';
1010

1111
constructor() {
12-
console.log('constructor called');
12+
console.log('constructor called...');
13+
}
14+
15+
/**
16+
* https://angular.io/guide/lifecycle-hooks
17+
*/
18+
ngAfterViewInit() {
19+
console.log("after the view initializes...");
1320
}
1421
}

0 commit comments

Comments
 (0)