Skip to content
This repository was archived by the owner on Apr 23, 2019. It is now read-only.

This repo and the tutorial on the website are out of sync. Tutorial code will not compile. #123

@amackillop

Description

@amackillop

The link to download this repo located here (as of 2019-03-12) as 'Play Starter Example Project' is out of sync with the rest of the tutorial that follows. This leads to the project being unable to compile if the instructions are followed exactly.

For example, the instructions for making the hello.scala.html here:

@main("Hello") {
    <section id="top">
        <div class="wrapper">
            <h1>Hello World</h1>
        </div>
    </section>
}

will not work because the main.scala.html template expects another explicit parameter which is an AssetsFinder. From source file here:

@(title: String, assetsFinder: AssetsFinder)(content: Html)

The solution is that you need to accept this parameter as an implicit and then pass it to main explicitly like so:

@()(implicit assetsFinder: AssetsFinder)

@main("Hello", assetsFinder) {
<section id="top">
    <div class="wrapper">
        <h1>Hello World</h1>
    </div>
</section>
}

Long story short, I think that either the download link or the tutorial instructions need to be updated in order to resolve this issue.

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