Title: The Plain tutorial does not include services/index.ts and models/index.ts · Issue #3 · NativeScript/tutorials · GitHub
Open Graph Title: The Plain tutorial does not include services/index.ts and models/index.ts · Issue #3 · NativeScript/tutorials
X Title: The Plain tutorial does not include services/index.ts and models/index.ts · Issue #3 · NativeScript/tutorials
Description: In the Plain tutorial the folder structure is defined as: app |- assets |- anastasia.png |- beetlejuicemusical.png |- bookofmormon.png |- home |- home-page.ts |- home-page.xml |- home-view-model.ts |- details |- details-page.ts |- detail...
Open Graph Description: In the Plain tutorial the folder structure is defined as: app |- assets |- anastasia.png |- beetlejuicemusical.png |- bookofmormon.png |- home |- home-page.ts |- home-page.xml |- home-view-model.ts...
X Description: In the Plain tutorial the folder structure is defined as: app |- assets |- anastasia.png |- beetlejuicemusical.png |- bookofmormon.png |- home |- home-page.ts |- home-page.xml |- home-view-model.ts...
Opengraph URL: https://github.com/NativeScript/tutorials/issues/3
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The Plain tutorial does not include services/index.ts and models/index.ts","articleBody":"In the [Plain tutorial](https://docs.nativescript.org/tutorial/plain.html#folder-structure) the folder structure is defined as:\r\n\r\n```\r\napp\r\n |- assets\r\n |- anastasia.png\r\n |- beetlejuicemusical.png\r\n |- bookofmormon.png\r\n |- home\r\n |- home-page.ts\r\n |- home-page.xml\r\n |- home-view-model.ts\r\n |- details\r\n |- details-page.ts\r\n |- details-page.xml\r\n |- details-view-model.ts\r\n |- models\r\n |- flick.model.ts\r\n |- services\r\n |- flick.service.ts\r\n |- app-root.xml\r\n |- app.css\r\n |- app.ts\r\n```\r\n\r\nAnd code is provided for the relevant files. However the `{ ModuleName }` structure of the imports means that the models and services folders need `index.ts` files for the imports to work. Indeed, these files exist in the GitHub repo but there is no reference to them in the tutorial. The file structure should be\r\n\r\n```\r\napp\r\n |- assets\r\n |- anastasia.png\r\n |- beetlejuicemusical.png\r\n |- bookofmormon.png\r\n |- home\r\n |- home-page.ts\r\n |- home-page.xml\r\n |- home-view-model.ts\r\n |- details\r\n |- details-page.ts\r\n |- details-page.xml\r\n |- details-view-model.ts\r\n |- models\r\n |- flick.model.ts\r\n |- index.ts\r\n |- services\r\n |- flick.service.ts\r\n |- index.ts\r\n |- app-root.xml\r\n |- app.css\r\n |- app.ts\r\n```\r\n\r\nAnd code should be provided as follows:\r\n\r\n```\r\n// app/services/index.ts\r\nexport * from \"./flick.service\";\r\n```\r\n\r\n```\r\n// app/models/index.ts\r\nexport * from \"./flick.model\";\r\n```","author":{"url":"https://github.com/alecgregory","@type":"Person","name":"alecgregory"},"datePublished":"2022-05-16T15:46:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3/tutorials/issues/3"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ef640c5b-8f8c-b1d1-ba3d-2dc4c8b90674 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A89A:39573E:3E59081:5342E92:6980896B |
| html-safe-nonce | 08100e1c35b8bf05f2158d704e11795fe05b2983646f9f0db938ed0c8dd10515 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODlBOjM5NTczRTozRTU5MDgxOjUzNDJFOTI6Njk4MDg5NkIiLCJ2aXNpdG9yX2lkIjoiODE1NjA5MDAxNzIzNjY4MzExNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d4bd1eadcdcaa4baf948c265c6e0d3f271cb9b00b31cd2073a7ec46109c1dd2c |
| hovercard-subject-tag | issue:1237354679 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/tutorials/3/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1d7ae22d63bb466e253ee1d7ac58945c848774cd97e9afbf1a2c699d31128bd4/NativeScript/tutorials/issues/3 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1d7ae22d63bb466e253ee1d7ac58945c848774cd97e9afbf1a2c699d31128bd4/NativeScript/tutorials/issues/3 |
| og:image:alt | In the Plain tutorial the folder structure is defined as: app |- assets |- anastasia.png |- beetlejuicemusical.png |- bookofmormon.png |- home |- home-page.ts |- home-page.xml |- home-view-model.ts... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alecgregory |
| hostname | github.com |
| expected-hostname | github.com |
| None | a655d4df3b43671613bf5bf4449d183ed68a015e5d32b00269218f3d9a2e710d |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/tutorials git https://github.com/NativeScript/tutorials.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 429924063 |
| octolytics-dimension-repository_nwo | NativeScript/tutorials |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 429924063 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/tutorials |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4fc036202b2c45e242f3563a131cd4c7da5a7c7d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width