You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sofarwe'vediscussedtheNeststandardwayofmanipulatingresponses. Thesecondwayofmanipulatingtheresponseistousealibrary-specific [responseobject](https://expressjs.com/en/api.html#res). In order to inject a particular response object, we need to use the `@Res()` decorator. To show the differences, let's rewrite the `CatsController` to the following:
Copy file name to clipboardExpand all lines: content/fundamentals/dynamic-modules.md
+15-27Lines changed: 15 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ The challenge is that the configuration module itself, since it's generic (simil
67
67
68
68
In other words, dynamic modules provide an API for importing one module into another, and customizing the properties and behavior of that module when it is imported, as opposed to using the static bindings we've seen so far.
69
69
70
-
<app-banner-shop></app-banner-shop>
70
+
<app-banner-devtools></app-banner-devtools>
71
71
72
72
#### Config module example
73
73
@@ -431,18 +431,17 @@ There are edge-cases when your module may need to take extra options that determ
431
431
In such cases, the `ConfigurableModuleBuilder#setExtras` method can be used. See the following example:
In the example above, the first argument passed into the `setExtras` method is an object containing default values for the "extra" properties. The second argument is a function that takes an auto-generated module definitions (with `provider`, `exports`, etc.) and `extras` object which represents extra properties (either specified by the consumer or defaults). The returned value of this function is a modified module definition. In this specific example, we're taking the `extras.isGlobal` property and assigning it to the `global` property of the module definition (which in turn determines whether a module is global or not, read more [here](/modules#dynamic-modules)).
@@ -466,9 +465,7 @@ However, since `isGlobal` is declared as an "extra" property, it won't be availa
Copy file name to clipboardExpand all lines: content/microservices/basics.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -322,7 +322,7 @@ async publish() {
322
322
323
323
The `emit()` method takes two arguments, `pattern` and `payload`. The `pattern`should match one defined in an `@EventPattern()` decorator. The `payload` is an event payload that we want to transmit to the remote microservice. This method returns a **hot `Observable`** (unlike the cold `Observable` returned by `send()`), which means that whether or not you explicitly subscribe to the observable, the proxy will immediately try to deliver the event.
Copy file name to clipboardExpand all lines: content/techniques/configuration.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -457,8 +457,6 @@ import { validate } from './env.validation';
457
457
exportclassAppModule {}
458
458
```
459
459
460
-
<app-banner-shop></app-banner-shop>
461
-
462
460
#### Custom getter functions
463
461
464
462
`ConfigService` defines a generic `get()` method to retrieve a configuration value by key. We may also add `getter` functions to enable a little more natural coding style:
0 commit comments