Skip to content

Commit 7252a45

Browse files
authored
docs(readme): gotchas
1 parent 40bf6c1 commit 7252a45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,10 @@ Well now, your Client-side Angular will take over, and you'll have a fully funct
339339

340340
> When building components in Angular 5 there are a few things to keep in mind.
341341

342+
- Make sure you provide Absolute URLs when calling any APIs. (The server can't understand relative paths, so `/api/whatever` will fail).
343+
344+
- API calls will be ran during a server, and once again during the client render, so make sure you're using transfering data that's important to you so that you don't see a flicker.
345+
342346
- **`window`**, **`document`**, **`navigator`**, and other browser types - _do not exist on the server_ - so using them, or any library that uses them (jQuery for example) will not work. You do have some options, if you truly need some of this functionality:
343347
- If you need to use them, consider limiting them to only your client and wrapping them situationally. You can use the Object injected using the PLATFORM_ID token to check whether the current platform is browser or server.
344348

@@ -444,7 +448,7 @@ Nothing's ever perfect, but please let me know by creating an issue (make sure t
444448
445449
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](/LICENSE)
446450
447-
Copyright (c) 2016-2017 [Mark Pieszak](https://github.com/MarkPieszak)
451+
Copyright (c) 2016-2018 [Mark Pieszak](https://github.com/MarkPieszak)
448452
449453
----
450454

0 commit comments

Comments
 (0)