Skip to content

Generate a top-level <project-name> component and put it in index.stache #269

@mjstahl

Description

@mjstahl

Description:

For a newly generated application we should do the following:

  1. Generate a <main_folder>/components/<project-name> component.
  2. Place this <project-name> component in the index.stache instead of a <h1>.

This occurred after conversations about a client project.

The app.js should only be responsible for three things:

  1. Rendering the appropriate application entry, whether that be the application itself (when their is a session), or a log in page, or something else the application may need.
  2. Manage the route
  3. Acquire and manage the session of the application.

With this addition an index.stache might look like:

<html>
  <head>
    <title>{{title}}</title>
  </head>
  <body>
    <can-import from="hello-world/styles.less" />
    <can-import from="hello-world/app" export-as="viewModel" />
    <can-import from="hello-world/components/hello-world />
    
    <hello-world />

    {{!--
    {{#if session}}
      <hello-world />
    {{else}}
      <login session:to="session" />
    {{/if}}
    --}}
    ...

Or something like that.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions