angular-cn/aio/content/examples
Sonu Kapoor f49b45832c build(docs-infra): always specify a landing file for StackBlitz projects (#34553)
The StackBlitz API (which we use to generate StackBlitz projects on the
fly, when a user clicks on a live example link in the docs) allows
specifying the file to open in the editor by passing a query param. If
no file is specified, StackBlitz opens a default one. In the past, it
used to be `main.ts` and nowadays it seems to be `app.component.ts`.

StackBlitz builder, the tool that we use to generate the StackBlitz
projects, allows specifying the primary file by setting the `file`
property in the corresponding `stackblitz.json`.

Previously, if the `file` property was not set, StackBlitz builder would
not specify a file, thus falling back on StackBlitz's default behavior.
This was not great, because the default behavior may change unexpectedly
is the future to something that is less useful for our users.

This commit change StackBlitz builder to always specify a primary file.
If no file is specified in `stackblitz.json`, the builder will look
for the first file that exists in the example from a list of predefined
files.

Partially addresses #22357.

PR Close #34553
2020-01-22 13:45:23 -08:00
..
accessibility build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
ajs-quick-reference docs: remove gender prefixes from examples (#29972) 2019-05-20 16:42:59 -07:00
animations build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
architecture build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
attribute-binding docs: rewrite attribute binding section and add example (#26004) 2019-06-14 12:21:28 -07:00
attribute-directives build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
binding-syntax test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
bootstrapping docs: update docs example dependencies to version 8 (#30385) 2019-05-17 14:16:55 -07:00
built-in-directives docs: include svg files in stackblitz and download examples (#31559) 2019-07-15 16:48:23 -04:00
built-in-template-functions
cli-builder/src fix(docs-infra): convert hard-coded `cli-builder` examples into a proper mini-app (#34362) 2020-01-21 13:12:18 -05:00
comparing-observables/src fix(docs-infra): convert hard-coded `comparing-observables` examples into a proper mini-app (#34327) 2020-01-21 13:14:46 -05:00
component-interaction docs: replace class hero to interface wherever class properties not used (#34022) 2019-11-25 11:37:39 -05:00
component-styles build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dependency-injection build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dependency-injection-in-action build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
displaying-data build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
docs-style-guide build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dynamic-component-loader build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
dynamic-form build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
elements build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
event-binding docs(core): fix typo in event-binding code example (#31611) 2019-07-17 13:26:48 -04:00
feature-modules docs: update docs example dependencies to version 8 (#30385) 2019-05-17 14:16:55 -07:00
form-validation build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
forms build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
forms-overview build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
getting-started build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
getting-started-v0 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
hierarchical-dependency-injection build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
http build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
i18n docs: initial Ivy i18n guide updates (#33762) 2019-11-25 14:12:18 -05:00
inputs-outputs docs: rewrite inputs/outputs section of Template Syntax (#27685) 2019-06-14 11:53:13 -07:00
interpolation
lazy-loading-ngmodules build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
lifecycle-hooks test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
ngcontainer docs: replace class hero to interface wherever class properties not used (#34022) 2019-11-25 11:37:39 -05:00
ngmodule-faq/src/app
ngmodules build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
observables test(docs-infra): compile only app for examples with no e2e (#33717) 2020-01-14 16:42:22 -08:00
observables-in-angular test(docs-infra): compile only app for examples with no e2e (#33717) 2020-01-14 16:42:22 -08:00
pipes docs: correct types in transform method to match specification. (#29812) 2019-05-15 14:24:20 -07:00
practical-observable-usage test(docs-infra): compile only app for examples with no e2e (#33717) 2020-01-14 16:42:22 -08:00
property-binding docs: replace from class hero to interface with accordance with # 344022 (#34294) 2020-01-13 07:25:19 -08:00
providers docs: update docs example dependencies to version 8 (#30385) 2019-05-17 14:16:55 -07:00
providers-viewproviders docs: edit copy and example in hierarchical injectors guide (#32501) 2019-09-06 18:28:42 -04:00
reactive-forms build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
resolution-modifiers docs: clarify hierarchical injectors (#28700) 2019-08-15 12:43:51 -07:00
router build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
rx-library test(docs-infra): compile only app for examples with no e2e (#33717) 2020-01-14 16:42:22 -08:00
schematics-for-libraries refactor(core): Migrate TestBed.get to TestBed.inject (#32382) 2019-09-09 19:10:54 -04:00
security build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
service-worker-getting-started docs: update docs example dependencies to version 8 (#30385) 2019-05-17 14:16:55 -07:00
set-document-title build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
setup build(docs-infra): remove unused StackBlitz/ZIP configurations for `setup` example (#31937) 2019-08-05 09:54:52 -07:00
structural-directives build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
styleguide docs: edit EventEmitter name in styleguide (#33923) 2019-11-25 18:40:51 -05:00
template-expression-operators docs: edit and add example for Template Expression Operators section of Template Syntax (#28087) 2019-06-14 11:53:50 -07:00
template-reference-variables test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
template-syntax test: clean up explicit dynamic query usages (#33015) 2019-10-17 16:10:10 -04:00
testing docs: replace lazy loading import syntax parameter name (#34599) 2020-01-07 10:44:12 -08:00
toh-pt0 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt1 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt2 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt3 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt4 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt5 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
toh-pt6 build(docs-infra): always specify a landing file for StackBlitz projects (#34553) 2020-01-22 13:45:23 -08:00
two-way-binding docs: add example and edit two-way-binding section of Template Syntax (#26278) 2019-06-14 11:50:03 -07:00
universal docs: replace class hero to interface wherever class properties not used (#34022) 2019-11-25 11:37:39 -05:00
upgrade-lazy-load-ajs docs: add tests for lazy loading angularjs example (#30622) 2019-06-28 09:26:49 -07:00
upgrade-module
upgrade-phonecat-1-typescript feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
upgrade-phonecat-2-hybrid feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
upgrade-phonecat-3-final feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
user-input docs(docs-infra): use recommended type assertion (#31042) 2019-10-02 13:25:39 -07:00
visual-studio-2015 feat: make the Ivy compiler the default for ngc (#32219) 2019-08-20 16:41:08 -07:00
.gitignore docs: update docs example dependencies to version 8 (#30385) 2019-05-17 14:16:55 -07:00
tsconfig.json
tslint.json refactor: remove tslint no-use-before-declare rule (#30288) 2019-05-07 10:25:36 -07:00