Created
December 17, 2015 18:46
-
-
Save luna-duclos/e02411700c889c7d2653 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script> | |
<link rel="import" href="name-tag.html"> | |
<script src="gopherjs_polymer_playground.js"></script> | |
</head> | |
<body> | |
<name-tag></name-tag> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"code.palmstonegames.com/polymer" | |
) | |
type NameTag struct { | |
polymer.Proto | |
Name string `polymer:"name"` | |
} | |
func (n *NameTag) TagName() string { | |
return "name-tag" | |
} | |
func (n *NameTag) Created() { | |
n.Name = "Looney" | |
} | |
func main() { | |
polymer.Register(&NameTag{}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="bower_components/polymer/polymer.html"> | |
<dom-module id="name-tag"> | |
<template> | |
This is <b>{{ name }}</b>'s name-tag element. | |
</template> | |
</dom-module> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment