mattlewis92 / angular-bootstrap-calendar

A port of the bootstrap calendar widget to AngularJS (no jQuery required!)
https://mattlewis92.github.io/angular-bootstrap-calendar/
MIT License
798 stars 367 forks source link

Delete button and {{ calendarTitle }} are not working #565

Closed yasserht closed 7 years ago

yasserht commented 7 years ago

Hello Matt, I tried using {{ calendarTitle }} but it's not showing anything ( I'm using multiple calendars in the same page). Also Delete button is not deleting events even in the demo you provided. Thank you in advance

burtek commented 7 years ago

Please provide link to minimally-working plunker that reproduces the issue (starter template: http://plnkr.co/edit/LE4F4U7AnnD3tjM9ZH4G?p=preview)

burtek commented 7 years ago

Are you sure you set up angular and it's modules correctly? Are you sure you have JS enabled in your browser?

yasserht commented 7 years ago

Thank you I do have JS enabled and I guess Im using modules in the right way, but still no calendartitle here's a plunker http://plnkr.co/edit/UHjZ0ROqx7ijrsQLrsRA?p=preview when i click the remove icon instead of showing an alert i want it to delete that event

burtek commented 7 years ago

Lines 14-16 in example.js of your plunker show:

  onClick: function(args) {
    alert.show('Deleted', args.calendarEvent);
  }

There is no code, that would delete the event.

And I can't see where are you trying to use {{ calendarTitle }}

yasserht commented 7 years ago

Yes, I used vm.events.splice() but it's not working, what should I write ?

burtek commented 7 years ago

vm.events.splice(args.calendarEvent.calendarEventId, 1) seems to be working for me

yasserht commented 7 years ago

just tried it, working perfectly Thank youu

yasserht commented 7 years ago

what if we're using it in an html page is it the same ng-click="vm.events.splice()" also can I show only {{ calendarTitle }} on a page without the calendar ?

burtek commented 7 years ago

Depends how and where you want to use it.

yasserht commented 7 years ago

im using 8+ calendars in parallel , `

{{ vm.calendarTitle }}

` but this is not showing anything
burtek commented 7 years ago

I'm still not able to help you until you provide me with a plunker that reproduces the issue.

yasserht commented 7 years ago

I used <h1 class="text-center">{{ vm.viewTitle }}</h1> instead and it's working Thank you