Skip to content

Commit 88765d5

Browse files
hppycoderjeffbcross
authored andcommitted
docs(guide): remove redundancy in providers guide
Highlighted the Best Practices section, and took the styling from the Services doc. Also removed some superfluous wording that was in the "Provider Recipe"
1 parent d1df21e commit 88765d5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/content/guide/providers.ngdoc

+4-3
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,11 @@ In the code above, we see how the `apiToken` service is defined via the Factory
132132
on the `clientId` service. The factory service then uses NSA-proof encryption to produce an authentication
133133
token.
134134

135-
Note: It is best practice to name the factory functions as `<serviceId>Factory`
135+
<div class="alert alert-success">
136+
**Best Practice:** name the factory functions as `<serviceId>Factory`
136137
(e.g. apiTokenFactory). While this naming convention is not required, it helps when navigating the code base
137138
or looking at stack traces in the debugger.
139+
</div>
138140

139141
Just like with Value recipe, Factory recipe can create a service of any type, whether it be a
140142
primitive, object literal, function, or even an instance of a custom type.
@@ -193,8 +195,7 @@ that would mess with the teachers.
193195

194196
## Provider Recipe
195197

196-
There are two more recipe types left to cover. They are both fairly specialized and are used
197-
infrequently. As already mentioned in the intro, the Provider recipe is the core recipe type and
198+
As already mentioned in the intro, the Provider recipe is the core recipe type and
198199
all the other recipe types are just syntactic sugar on top of it. It is the most verbose recipe
199200
with the most abilities, but for most services it's overkill.
200201

0 commit comments

Comments
 (0)