Skip to content

Commit 5fb82cb

Browse files
authored
Fixing implementation of "a-route-params-subscribe" snippet (#117)
1 parent 5a94a5e commit 5fb82cb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

snippets/typescript.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
"description": "Angular - subscribe to routing parameters",
109109
"body": [
110110
"this.route.paramMap",
111-
"\t.pipe(switchMap(params => params.get('id')), tap(id => (this.id = +id)))",
111+
"\t.pipe(map(params => params.get('id')), tap(id => (this.id = +id)))",
112112
"\t.subscribe(id => {$1});",
113113
"$0"
114114
]

0 commit comments

Comments
 (0)