Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Plain tutorial does not include services/index.ts and models/index.ts #3

Open
alecgregory opened this issue May 16, 2022 · 0 comments

Comments

@alecgregory
Copy link

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
      |- details-page.xml
      |- details-view-model.ts
  |- models
      |- flick.model.ts
  |- services
      |- flick.service.ts
  |- app-root.xml
  |- app.css
  |- app.ts

And 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

app
  |- assets
      |- anastasia.png
      |- beetlejuicemusical.png
      |- bookofmormon.png
  |- home
      |- home-page.ts
      |- home-page.xml
      |- home-view-model.ts
  |- details
      |- details-page.ts
      |- details-page.xml
      |- details-view-model.ts
  |- models
      |- flick.model.ts
      |- index.ts
  |- services
      |- flick.service.ts
      |- index.ts
  |- app-root.xml
  |- app.css
  |- app.ts

And code should be provided as follows:

// app/services/index.ts
export * from "./flick.service";
// app/models/index.ts
export * from "./flick.model";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant