2017-04-09 4 views
1

나는 https://www.npmjs.com/package/angular2-fullcalendar을 언급했다. 그러나 제대로 표시되지 않습니다. 일정의 머리글 부분 만 표시됩니다. 어디서 실수입니까?angular2-fullcalendar를 사용하지 않음

npm install ap-angular2-fullcalendar --save 

import { BrowserModule } from '@angular/platform-browser'; 
import { NgModule } from '@angular/core'; 
import { FormsModule } from '@angular/forms'; 
import { HttpModule } from '@angular/http'; 

import { AppComponent } from './app.component'; 
import {CalendarComponent} from "ap-angular2-fullcalendar"; 

@NgModule({ 
    declarations: [ 
    AppComponent, 
    CalendarComponent 
    ], 
    imports: [ 
    BrowserModule, 
    FormsModule, 
    HttpModule 
    ], 
    providers: [], 
    bootstrap: [AppComponent] 
}) 
export class AppModule { } 

있는 style.css

@import "../node_modules/fullcalendar/dist/fullcalendar.min.css"; 

app.component.html에게

<angular2-fullcalendar [options]="calendarOptions"></angular2-fullcalendar> 

app.component.ts을 app.module.ts

,617,451
import {Component, ViewChild} from '@angular/core'; 
import {CalendarComponent} from "ap-angular2-fullcalendar"; 

@Component({ 
    selector: 'app-root', 
    templateUrl: './app.component.html', 
    styleUrls: ['./app.component.css'] 
}) 
export class AppComponent { 
    title = 'app works!'; 


    @ViewChild(CalendarComponent) myCalendar: CalendarComponent; 

    changeCalendarView(view) { 
    this.myCalendar.fullCalendar('changeView', view); 
    } 

    calendarOptions:Object = { 
    height: 'parent', 
    fixedWeekCount : false, 
    defaultDate: '2016-09-12', 
    editable: true, 
    eventLimit: true, // allow "more" link when too many events 
    events: [ 
     { 
     title: 'All Day Event', 
     start: '2016-09-01' 
     }, 
     { 
     title: 'Long Event', 
     start: '2016-09-07', 
     end: '2016-09-10' 
     }, 
     { 
     id: 999, 
     title: 'Repeating Event', 
     start: '2016-09-09T16:00:00' 
     }, 
     { 
     id: 999, 
     title: 'Repeating Event', 
     start: '2016-09-16T16:00:00' 
     }, 
     { 
     title: 'Conference', 
     start: '2016-09-11', 
     end: '2016-09-13' 
     }, 
     { 
     title: 'Click for Google', 
     url: 'http://google.com/', 
     start: '2016-09-28' 
     } 
    ] 
    }; 

} 

enter image description here

+0

콘솔에서 오류가 발생하고 있습니까? –

+0

브라우저 콘솔을 보았습니다. 오류가 없습니다. –

+0

괜찮아요. 문제를 발견했습니다. 높이를 제거하십시오 : 부모님이 당신의 선택에서. –

답변

0

515,는 어떻게 든 높이를 사용 : 옵션에서 부모 설정 0으로 일정 본체의 높이를 설정 그래서 달력을보고 그 주석해야합니다.

+0

일본어 정보가 충분하지 않아서 매우 도움이되었습니다. 장래에 다른 일본어가 내가하는 것처럼 똑같은 문제를 겪지 않도록 일본어에 관한 정보를 만들었습니다. 대단히 감사합니다. http://qiita.com/kuniatsu/items/203d5d17194b0befb189 –

+0

죄송합니다. 편집 : 나중에 편집 한 댓글을 읽으세요. 멋진 일 –

+0

내가 가르쳐 준 것을 일본어로 만들었습니다. 정말 고맙습니다. –