docs(server-comm): fix path to heroes.json for Dart (#2837)
This commit is contained in:
parent
8f7d5930cd
commit
79375cab3e
|
@ -648,8 +648,9 @@ a#in-mem-web-api
|
||||||
:marked
|
:marked
|
||||||
## Appendix: Tour of Heroes in-memory server
|
## Appendix: Tour of Heroes in-memory server
|
||||||
|
|
||||||
If we only cared to retrieve data, we could tell Angular to get the heroes from a `heroes.json` file like this one:
|
If the app only needed to retrieve data, you could get the heroes from a `heroes.json` file:
|
||||||
+makeJson('server-communication/ts/app/heroes.json', null, 'app/heroes.json')(format=".")
|
- var _heroesJsonPath = (_docsFor == 'dart' ? 'web' : 'app') + '/heroes.json';
|
||||||
|
+makeJson('server-communication/' + _docsFor + '/' + _heroesJsonPath, null, _heroesJsonPath)(format=".")
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
:marked
|
:marked
|
||||||
We wrap the heroes array in an object with a `data` property for the same reason that a data server does:
|
We wrap the heroes array in an object with a `data` property for the same reason that a data server does:
|
||||||
|
|
|
@ -653,7 +653,8 @@ a#in-mem-web-api
|
||||||
## Appendix: Tour of Heroes in-memory server
|
## Appendix: Tour of Heroes in-memory server
|
||||||
|
|
||||||
If the app only needed to retrieve data, you could get the heroes from a `heroes.json` file:
|
If the app only needed to retrieve data, you could get the heroes from a `heroes.json` file:
|
||||||
+makeJson('server-communication/ts/app/heroes.json', null, 'app/heroes.json')(format=".")
|
- var _heroesJsonPath = (_docsFor == 'dart' ? 'web' : 'app') + '/heroes.json';
|
||||||
|
+makeJson('server-communication/' + _docsFor + '/' + _heroesJsonPath, null, _heroesJsonPath)(format=".")
|
||||||
.l-sub-section
|
.l-sub-section
|
||||||
:marked
|
:marked
|
||||||
You wrap the heroes array in an object with a `data` property for the same reason that a data server does:
|
You wrap the heroes array in an object with a `data` property for the same reason that a data server does:
|
||||||
|
|
Loading…
Reference in New Issue