2
votes

Where has the core-scaffold element gone in polymer 1.0? I was expecting to find an Iron element that would do just the same, but a glance at the documentation proved me wrong. This element was very useful to quickly set up a layout, are there any alternatives?

2

2 Answers

3
votes

In 1.0 we're using a combination of <paper-drawer-panel>, <paper-toolbar>, <paper-header-panel> and <paper-toolbar>.

In 1.0 Polymer Starter Kit (Github version) will do all the scaffolding for you (or at least get you started).

It's super simple to do.

Just install npm and yeoman at your terminal. Then at your command line, just hit:

$ mkdir myproject
$ cd myproject
$ yo polymer

Then give it a few minutes to run and it scaffolds everything out nicely for you. If you want to make a custom element, just do:

$ yo polymer:seed

and you're all set.

Bonus Update

Recently, there was an amazing video posted by Rob Dodson of the Polymer team about how to take your project "end-to-end" using Polymer! Check it out here! https://www.youtube.com/watch?v=1f_Tj_JnStA

1
votes

As Mowzer already stated you can recreate the core-scaffold element by making use of the paper elements in Polymer 1.0. The following snippet should create something very similar to what you are looking for:

<paper-drawer-panel>
  <paper-header-panel drawer>
    <paper-toolbar>
      <div>Application</div>
    </paper-toolbar>
    <div> Drawer content...</div>
  </paper-header-panel>
  <paper-header-panel main>
    <paper-toolbar>
      <paper-icon-button icon="menu" paper-drawer-toggle></paper-icon-button>
        <div>Title</div>
    </paper-toolbar>
    <div> Main content...</div>
  </paper-header-panel>
</paper-drawer-panel>

Just make sure you setup your imports properly and you should be good to go.