File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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}/*" ,
Original file line number Diff line number Diff line change 3232 }
3333 }
3434 },
35+
3536 "options" : {
37+ // Note: The ./client directory
3638 "cwd" : " ${workspaceFolder}/client"
3739 },
40+
3841 },
3942 ]
4043}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Debugging Angular with Visual Studio Code.
1818The 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.
32321 . [ launch.json] ( ./.vscode/launch.json )
33332 . [ tasks.json] ( ./.vscode/tasks.json )
3434
35- ### Launchers
35+ ### Run Launchers
3636Launching and debugging in chrome will allow you to use break points in the source code.
3737The launchers are based on https://github.com/microsoft/vscode-recipes/tree/master/Angular-CLI .
3838
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments