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

using /Templates directory for templates #34

Closed bonjoh closed 9 years ago

bonjoh commented 9 years ago

Hi,

Is there a way to use the /templates directory templates instead of lines 16-20 for the week, month, year templates from angular-bootstrap-calendar-tpls.js? I'm sure there is, and I'm sure it has to do with angular-bootstrap-calendar.js, but I just really don't get how to do it.

I've very new to angular; it's probably just something I've missed.

It's a nice looking little package, though, and I'm really enjoying digging into it!

mattlewis92 commented 9 years ago

Use the version without the templates bundled called angular-bootstrap-calendar.js

Then you need to create your own templates, you have a few options on how to set them though. You can either inject them using this: https://docs.angularjs.org/api/ng/service/$templateCache

Or you can decorate the directive and change the templateUrl variable to a different path, a guide to do this can be found here: http://angular-tips.com/blog/2013/09/experiment-decorating-directives/

Hope this helps :)