From 79375cab3e4867bf7d5f5efc2742110dfd8b1b10 Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Sun, 20 Nov 2016 13:35:00 -0800 Subject: [PATCH] docs(server-comm): fix path to heroes.json for Dart (#2837) --- public/docs/ts/_cache/guide/server-communication.jade | 5 +++-- public/docs/ts/latest/guide/server-communication.jade | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/public/docs/ts/_cache/guide/server-communication.jade b/public/docs/ts/_cache/guide/server-communication.jade index 1afea82d84..ae65322dd7 100644 --- a/public/docs/ts/_cache/guide/server-communication.jade +++ b/public/docs/ts/_cache/guide/server-communication.jade @@ -648,8 +648,9 @@ a#in-mem-web-api :marked ## 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: -+makeJson('server-communication/ts/app/heroes.json', null, 'app/heroes.json')(format=".") + If the app only needed to retrieve data, you could get the heroes from a `heroes.json` file: +- var _heroesJsonPath = (_docsFor == 'dart' ? 'web' : 'app') + '/heroes.json'; ++makeJson('server-communication/' + _docsFor + '/' + _heroesJsonPath, null, _heroesJsonPath)(format=".") .l-sub-section :marked We wrap the heroes array in an object with a `data` property for the same reason that a data server does: diff --git a/public/docs/ts/latest/guide/server-communication.jade b/public/docs/ts/latest/guide/server-communication.jade index becc3eef17..5e3b67d239 100644 --- a/public/docs/ts/latest/guide/server-communication.jade +++ b/public/docs/ts/latest/guide/server-communication.jade @@ -653,7 +653,8 @@ a#in-mem-web-api ## 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: -+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 :marked You wrap the heroes array in an object with a `data` property for the same reason that a data server does: