Skip to content

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

Open
@alecgregory

Description

@alecgregory

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";

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions