heuristicat
heuristicat

Reputation: 31

Why isn't my dart/polymer custom element rendering?

I'm trying to write a custom element in dart/polymer but nothing renders and no errors are displayed. Does anyone know what I'm doing wrong? All the details are in the following gist.

https://gist.github.com/heuristicat/7947755

Thanks.

Upvotes: 2

Views: 101

Answers (2)

heuristicat
heuristicat

Reputation: 31

I found the problem. The following line...

<link rel="import" src="hello-world.html">

should have been...

<link rel="import" href="hello-world.html">

It is so obvious but all the src attributes in the script tags played tricks on my mind.

Thanks.

Upvotes: 1

G&#252;nter Z&#246;chbauer
G&#252;nter Z&#246;chbauer

Reputation: 657058

For Polymer you need the following script tags within the <head> tag after any element imports

<script type='application/dart'>
  export 'package:polymer/init.dart';
      </script>

<script src="packages/browser/dart.js"></script>

Upvotes: 0

Related Questions