habit-panel.js

angular.module('homepage').
directive('habitPanel', function () {
	return {
		controller: 'habitPanelController',
		restrict: 'E',
		replace: true,
		scope: {
			habit: '='
		},
		templateUrl: 'components/feature-components/habit/habit-panel.html'
	}
}).
controller('habitPanelController', function ($scope, $timeout) {
	// Initialize defaults
	$scope.habit.defaults = {repeat: 'DALY'};
	$scope.habit.time = {};
	$scope.habit.time.date = new Date();
	$timeout(function () {
		$scope.$apply();
	});
});