@Tubiss wrote:
this is my calendar how look like
ts file
import { Component } from '@angular/core'; import { IonicPage, NavController, NavParams } from 'ionic-angular'; import { Calendar } from '@ionic-native/calendar/ngx'; import { RmtServiceProvider } from '../../providers/rmt-service/rmt-service'; import {Http} from '@angular/http'; /** * Generated class for the TakvimPage page. * * See https://ionicframework.com/docs/components/#navigation for more info on * Ionic pages and navigation. */ @IonicPage() export class CalendarPage { currentEvents = [ { year: 2019, month: 2, date: 25, }, { year: 2019, month: 2, date: 26, } ]; constructor(public navCtrl: NavController , public navParams: NavParams, public remoteService : RmtServiceProvider,public http: Http,) { } ionViewDidLoad() { console.log('ionViewDidLoad CalendarPage'); } onDaySelect(e){ console.log(e); } onMonthSelect(e){ console.log(e); } onTitleSelect(e){ console.log(e); } goBackPage(){ this.navCtrl.push('HomePage'); } }html
<ion-content padding > <mycal [events]="currentEvents" (onDaySelect)="onDaySelect($event)" (onMonthSelect)="onMonthSelect($event)" > </mycal> </ion-content>provider
return new Promise(resolve => { this.http.get('http://127.0.0.1:8000/api/lessons' ) .map(res => res.json()) .subscribe(data => { this.data = data; console.log(data); resolve(this.data); }); }); }and my json like this
[{“name”:“firstlesson”, “start_time”:2019-09-22 17:13:02}]
how can ı display this on the calendar. ionic 3 angular 5
Posts: 1
Participants: 1
