mirror of
https://github.com/akveo/ngx-admin.git
synced 2026-01-08 02:28:50 +01:00
refactor(calendar): move fullCalendar into baFullCalendar
This commit is contained in:
parent
6bca50b36e
commit
8e82cc57ff
9 changed files with 108 additions and 60 deletions
|
|
@ -0,0 +1,25 @@
|
|||
import {Component, ViewChild, ViewEncapsulation, Input, Output, ElementRef, EventEmitter} from '@angular/core';
|
||||
|
||||
import './baFullCalendar.loader.ts';
|
||||
|
||||
@Component({
|
||||
selector: 'ba-full-calendar',
|
||||
template: require('./baFullCalendar.html'),
|
||||
encapsulation: ViewEncapsulation.None,
|
||||
})
|
||||
export class BaFullCalendar {
|
||||
|
||||
@Input() baFullCalendarConfiguration:Object;
|
||||
@Input() baFullCalendarClass:string;
|
||||
@Output() onCalendarReady = new EventEmitter<any>();
|
||||
|
||||
@ViewChild('baFullCalendar') private _selector:ElementRef;
|
||||
|
||||
constructor () {
|
||||
}
|
||||
|
||||
ngAfterViewInit() {
|
||||
let calendar = $(this._selector.nativeElement).fullCalendar(this.baFullCalendarConfiguration);
|
||||
this.onCalendarReady.emit(calendar);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
<div #baFullCalendar class="ba-full-calendar {{baFullCalendarClass || ''}}"></div>
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
require('fullcalendar/dist/fullcalendar.js');
|
||||
require('style-loader!fullcalendar/dist/fullcalendar.css');
|
||||
1
src/app/theme/components/baFullCalendar/index.ts
Normal file
1
src/app/theme/components/baFullCalendar/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from './baFullCalendar.component.ts';
|
||||
|
|
@ -6,3 +6,4 @@ export * from './baCard';
|
|||
export * from './baAmChart';
|
||||
export * from './baChartistChart';
|
||||
export * from './baBackTop';
|
||||
export * from './BaFullCalendar';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue