Created
September 7, 2017 18:46
-
-
Save edruder/524ed7a9fa9f816bf0bf2ee92df6d181 to your computer and use it in GitHub Desktop.
Ember Starter Kit // source http://jsbin.com/qivami
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> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> | |
<script src="http://builds.emberjs.com/tags/v2.12.0/ember-template-compiler.js"></script> | |
<script src="http://builds.emberjs.com/tags/v2.12.0/ember.debug.js"></script> | |
<style id="jsbin-css"> | |
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} | |
</style> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<h2>Welcome to Ember.js</h2> | |
{{outlet}} | |
</script> | |
<script type="text/x-handlebars" data-template-name="index"> | |
{{test-bindings classNames="hb-one hb-two hb-three"}} | |
</script> | |
<script type="text/x-handlebars" data-template-name='components/test-bindings'> | |
Component's css classes: {{classes}} | |
</script> | |
<script id="jsbin-javascript"> | |
App = Em.Application.create(); | |
App.TestBindingsComponent = Em.Component.extend({ | |
classNames: ['one','two','three'], | |
extraClasses: function() { | |
return ['extra-one', 'extra-two', 'extra-three'].join(' '); | |
}.property(), | |
classNameBindings: ['extraClasses'], | |
classes: function () { | |
return this.get('classNames').join(' '); | |
}.property() | |
}); | |
</script> | |
<script id="jsbin-source-html" type="text/html"><!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.1/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"><\/script> | |
<script src="http://builds.emberjs.com/tags/v2.12.0/ember-template-compiler.js"><\/script> | |
<script src="http://builds.emberjs.com/tags/v2.12.0/ember.debug.js"><\/script> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> | |
<h2>Welcome to Ember.js</h2> | |
{{outlet}} | |
<\/script> | |
<script type="text/x-handlebars" data-template-name="index"> | |
{{test-bindings classNames="hb-one hb-two hb-three"}} | |
<\/script> | |
<script type="text/x-handlebars" data-template-name='components/test-bindings'> | |
Component's css classes: {{classes}} | |
<\/script> | |
</body> | |
</html> | |
</script> | |
<script id="jsbin-source-css" type="text/css">/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">App = Em.Application.create(); | |
App.TestBindingsComponent = Em.Component.extend({ | |
classNames: ['one','two','three'], | |
extraClasses: function() { | |
return ['extra-one', 'extra-two', 'extra-three'].join(' '); | |
}.property(), | |
classNameBindings: ['extraClasses'], | |
classes: function () { | |
return this.get('classNames').join(' '); | |
}.property() | |
}); | |
</script></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
/* Put your CSS here */ | |
html, body { | |
margin: 20px; | |
} |
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
App = Em.Application.create(); | |
App.TestBindingsComponent = Em.Component.extend({ | |
classNames: ['one','two','three'], | |
extraClasses: function() { | |
return ['extra-one', 'extra-two', 'extra-three'].join(' '); | |
}.property(), | |
classNameBindings: ['extraClasses'], | |
classes: function () { | |
return this.get('classNames').join(' '); | |
}.property() | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment