ember-fullcalendar brings the power of FullCalendar and FullCalendar Scheduler to Ember.
This addon works in Ember 2.12+ with no deprecations.
To install it run:
ember install ember-fullcalendar
This addon currently supports every option and callback currently available for FullCalendar and FullCalendar Scheduler 4.4. Please see the FullCalendar documentation for more information.
If you upgrade from a previous version of ember-fullcalendar
using FullCalendar 3.x, note the FullCalendar v4 release notes and upgrade guide.
To use plugins, you need to pass a plugins
array to the full-calendar
component and add any plugins you need to the dependencies of your app. The plugin css must be included by adding the plugin to your environment.js.
You no longer need to define includeLocales
in your environment.js, but instead import and pass them in the locales
option.
Instead of setting includeScheduler
use the appropriate Scheduler plugins.
A simple example:
import dayGridPlugin from '@fullcalendar/daygrid';
let events = Ember.A([{
title: 'Event 1',
start: '2016-05-05T07:08:08',
end: '2016-05-05T09:08:08'
}, {
title: 'Event 2',
start: '2016-05-06T07:08:08',
end: '2016-05-07T09:08:08'
}, {
title: 'Event 3',
start: '2016-05-10T07:08:08',
end: '2016-05-10T09:48:08'
}, {
title: 'Event 4',
start: '2016-05-11T07:15:08',
end: '2016-05-11T09:08:08'
}]);
let plugins = [dayGridPlugin];
{{full-calendar events=events plugins=plugins}}
The CSS of the plugins you are using must be included by defining them in your config/environment.js
file:
emberFullCalendar: {
plugins: ['core', 'daygrid', 'list'],
}
To call FullCalendar methods, you need a reference to the calendar object.
A reference gets passed with every FullCalendar callback as last parameter, so you can use e.g. viewSkeletonRender
to get the object:
// app/controllers/application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
viewSkeletonRender(info, calendar) {
this.set('calendar', calendar);
},
nextMonth() {
this.calendar.next();
},
}
});
Where possible, this addon takes advantage of DDAU (Data Down, Actions Up) to allow your Ember app to interact with FullCalendar from outside of the component. Below are a list of properties that override default FullCalendar properties:
viewName
(replaces defaultView
) - allows you to change the view mode from outside of the component. For example, when using header=false
, you can use your own buttons to modify the viewName
property to change the view of the calendar.
viewRange
- can be used in conjunction with viewName
to simultaneously navigate to a new date when switching to a new view. See the docs.
onViewChange
- pass an action to be notified when the view changes. This is different than the viewRender
callback provided by FullCalendar as it is only triggered when the view changes and is not when any of the date navigation methods are called.
date
(replaces defaultDate
) - allows you to change the date from outside of the component.
All FullCalendar and FullCalendar Scheduler callbacks are supported and can be handled using Ember Actions. Here's a simple example:
Add the component to your template:
Add some events:
// app/routes/application.js
import Ember from 'ember';
export default Ember.Route.extend({
model: function() {
return {
events: Ember.A([{
title: 'Partayyyy', start: new Date()
}])
};
}
});
Register the action in your controller or component:
// app/controllers/application.js
import Ember from 'ember';
export default Ember.Controller.extend({
actions: {
clicked({event, jsEvent, view}){
this.showModal(event);
}
}
});
By default, the addon uses the Free Trial License Key provided by FullCalendar. If you have a paid license key, you may set it by explicitly passing it into the component as schedulerLicenseKey
or, the better option, is to set it in your config/environment.js
file like so:
var ENV = {
emberFullCalendar: {
schedulerLicenseKey: '<your license key>',
}
// Other options here, as needed.
};
To use locales, import and pass them in the locales
option. See the docs for more info
This addon now has minimal Fastboot support via #46.
Ember检查器是一个浏览器插件,用于调试Ember应用程序。 灰烬检查员包括以下主题 - S.No. 灰烬检查员方式和描述 1 安装Inspector 您可以安装Ember检查器来调试您的应用程序。 2 Object Inspector Ember检查器允许与Ember对象进行交互。 3 The View Tree 视图树提供应用程序的当前状态。 4 检查路由,数据选项卡和库信息 您可以看到检查
英文原文: http://emberjs.com/guides/getting-ember/index/ Ember构建 Ember的发布管理团队针对Ember和Ember Data维护了不同的发布方法。 频道 最新的Ember和Ember Data的 Release,Beta 和 Canary 构建可以在这里找到。每一个频道都提供了一个开发版、最小化版和生产版。更多关于不同频道的信息可以查看博客
ember-emojione ember-emojione is your emoji solution for Ember, based on the EmojiOne project. EmojiOne version 2 is used, which is free to use for everyone (CC BY-SA 4.0), you're only required to giv
Ember 3D Ember 3D is an Ember addon for using Three.js - an easy to use, lightweight, javascript 3D library. It is designed to: Prescribe a solid file structure to Three.js code using ES6 modules. Ena
Ember Table An addon to support large data set and a number of features around table. Ember Table canhandle over 100,000 rows without any rendering or performance issues. Ember Table 3.x supports: Emb
vscode-ember This is the VSCode extension to use the Ember Language Server. Features All features currently only work in Ember-CLI apps that use classic structure and are a rough first draft with a lo