JSFiddle - React, Tailwind, and code Playground

by hbulhoes

HTML

<div ng-app="myapp">
    <div ng-controller="MyController">
        {{ DaysInCurrentMonth }}
    </div>
</div>

JavaScript

var mod = angular.module('myapp', []);

mod.value('daysInMonth', function(month, year) {
    return new Date(year, month+1,0).getDate();
});

function MyController($scope, daysInMonth){
    $scope.DaysInCurrentMonth = daysInMonth(12, 2012);
}