From 83fab4166691aefcf102abb40e051ab65c6d74f8 Mon Sep 17 00:00:00 2001 From: Ward Bell Date: Mon, 30 Nov 2015 21:21:49 -0800 Subject: [PATCH] (docs) fix plunker for Intro; minor Forms tweaks closes #426 --- .../forms/ts/src/app/hero-form.component.html | 3 +-- public/docs/_examples/forms/ts/src/plnkr.json | 7 +++++++ .../intro/ts/src/{plnkr.config => plnkr.json} | 0 public/docs/ts/latest/guide/forms.jade | 11 ++++++----- public/docs/ts/latest/guide/index.jade | 2 +- 5 files changed, 15 insertions(+), 8 deletions(-) rename public/docs/_examples/intro/ts/src/{plnkr.config => plnkr.json} (100%) diff --git a/public/docs/_examples/forms/ts/src/app/hero-form.component.html b/public/docs/_examples/forms/ts/src/app/hero-form.component.html index 9555882a95..d34b5c4667 100644 --- a/public/docs/_examples/forms/ts/src/app/hero-form.component.html +++ b/public/docs/_examples/forms/ts/src/app/hero-form.component.html @@ -1,5 +1,4 @@ - +
diff --git a/public/docs/_examples/forms/ts/src/plnkr.json b/public/docs/_examples/forms/ts/src/plnkr.json index e69de29bb2..60063d7d2c 100644 --- a/public/docs/_examples/forms/ts/src/plnkr.json +++ b/public/docs/_examples/forms/ts/src/plnkr.json @@ -0,0 +1,7 @@ +{ + "description": "Forms", + "files":[ + "!**/*.d.ts", + "!**/*.js" + ] +} \ No newline at end of file diff --git a/public/docs/_examples/intro/ts/src/plnkr.config b/public/docs/_examples/intro/ts/src/plnkr.json similarity index 100% rename from public/docs/_examples/intro/ts/src/plnkr.config rename to public/docs/_examples/intro/ts/src/plnkr.json diff --git a/public/docs/ts/latest/guide/forms.jade b/public/docs/ts/latest/guide/forms.jade index b1bc9d481c..e6c3135806 100644 --- a/public/docs/ts/latest/guide/forms.jade +++ b/public/docs/ts/latest/guide/forms.jade @@ -29,7 +29,8 @@ include ../../../../_includes/_util-fns - How to display validation errors to users and enable/disable form controls - How to share information across controls with template local variables - + + [Live Example](/resources/live-examples/forms/ts/src/plnkr.html) .l-main-section :marked ## Template-Driven Forms @@ -97,7 +98,7 @@ figure.image-display Create a new file in the app folder called `hero.ts` and give it the following class definition: -+makeExample('forms/ts/src/app/hero.ts', null, 'hero.ts') ++makeExample('forms/ts/src/app/hero.ts', null, 'app/hero.ts') :marked It's an anemic model with few requirements and no behavior. Perfect for our demo. @@ -123,7 +124,7 @@ figure.image-display Create a new file called `hero-form.component.ts` and give it the following definition: -+makeExample('forms/ts/src/app/hero-form.component.ts', 'first', 'app/hero-form.component.ts (v.1)') ++makeExample('forms/ts/src/app/hero-form.component.ts', 'first', 'app/hero-form.component.ts') :marked There’s nothing special about this component, nothing form-specific, nothing to distinguish it from any component we've written before. @@ -163,7 +164,7 @@ figure.image-display `app.ts` is the application's root component. It will host our new `HeroFormComponent`. Replace the contents of the "QuickStart" version with the following: -+makeExample('forms/ts/src/app/app.ts', null, 'app.ts') ++makeExample('forms/ts/src/app/app.ts', null, 'app/app.ts') :marked .l-sub-section @@ -183,7 +184,7 @@ figure.image-display Create a new template file called `hero-form.component.html` and give it the following definition: -+makeExample('forms/ts/src/app/hero-form.component.html', 'start', 'app/hero-form.component.html (v.1)') ++makeExample('forms/ts/src/app/hero-form.component.html', 'start', 'app/hero-form.component.html') :marked That is plain old HTML 5. We're presenting two of the `Hero` fields, `name` and `alterEgo`, and diff --git a/public/docs/ts/latest/guide/index.jade b/public/docs/ts/latest/guide/index.jade index 8c59624adc..38be01e8f1 100644 --- a/public/docs/ts/latest/guide/index.jade +++ b/public/docs/ts/latest/guide/index.jade @@ -29,7 +29,7 @@ figure Typically, these snippets are excerpts from a running sample application that accompanies the chapter. We can often find a link to a live version of that sample near the top of the chapter ... like this one. - [Live Example](/docs/_examples/intro/ts/src/plnkr.html) + [Live Example](/resources/live-examples/intro/ts/src/plnkr.html) This link opens in a browser and runs the sample code supporting this chapter's architecture overview. We can inspect, modify, save, and download the code.