Skip to content

Instantly share code, notes, and snippets.

@iheanyi
Created January 10, 2016 19:18
Show Gist options
  • Save iheanyi/631be0279b23c0596c76 to your computer and use it in GitHub Desktop.
Save iheanyi/631be0279b23c0596c76 to your computer and use it in GitHub Desktop.
New Twiddle
import Ember from 'ember';
export default Ember.Controller.extend({
appName:'Ember Twiddle',
events: [
{
title: 'Egghead Recording',
allDay: true,
date: Date.now(),
}
]
});
<h1>Welcome to {{appName}}</h1>
<br>
<br>
{{outlet}}
{{full-calendar events=events}}
<br>
<br>
import Ember from 'ember';
export default Ember.Component.extend({
setupCalendar: function() {
const calendar = Ember.$('.calendar');
Ember.$(calendar).fullCalendar({
events: this.attrs.events.value,
});
}.on('didInsertElement'),
});
<h1>Peep Calendar</h1>
<div class="calendar"></div>
{{yield}}
{
"version": "0.5.0",
"EmberENV": {
"FEATURES": {}
},
"options": {
"enable-testing": false
},
"dependencies": {
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js",
"ember": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember.debug.js",
"ember-data": "https://cdnjs.cloudflare.com/ajax/libs/ember-data.js/2.2.0/ember-data.js",
"ember-template-compiler": "https://cdnjs.cloudflare.com/ajax/libs/ember.js/2.2.0/ember-template-compiler.js",
"moment": "https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.11.1/moment.min.js",
"fullcalendar-css": "https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.0/fullcalendar.css",
"fullcalendar-js": "https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.0/fullcalendar.js"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment