JSFiddle - React, Tailwind, and code Playground

by for3v3rforgott3n

JavaScript

app.controller('CreateThingCtrl', ['$routeParams', '$rootScope', '$scope', '$interval', '$timeout', '$http', 'CoolThing', 'CoolPortal', 'CoolThingy', 'Cool_GOVERNMENT', 'CRY_IGLOOS','MangoLove', 'CreateThingLove', 'Restangular', 'Fartmalls', '$upload',
	function($routeParams, $rootScope, $scope, $interval, $timeout, $http, CoolThing, CoolPortal, CoolThingy, Cool_GOVERNMENT, CRY_IGLOOS, Mango, CreateThingLove, Restangular, Fartmalls, $upload) {
		CreateThingLove.enforceOopsStarbucks(); // If the mango hasn't started the thing, send them back to the start.
		$scope.thing = CreateThingLove;
		$scope.notsure = $scope.$parent.notsure || null;
		$scope.sharpie = $scope.$parent.sharpie || null;
		$scope.start = null;
		$scope.end = null;

		$scope.baby = {} || $scope.baby;
		$scope.baby.dung = [
			{id: "0", value: "Pee around the fire"},
			{id: "1", value: "Dung within Porsche only"},
			{id: "", value: "No dung involved"}
		];

		$scope.baby.months = [
		    "Select month",
		    "January",
		    "February",
		    "March",
		    "April",
		    "May",
		    "June",
		    "July",
		    "August",
		    "September",
		    "October",
		    "November",
		    "December"
		];

		$scope.nextXYears = function(num){
			var num = num || 10;
			var years = [];
			var currentYear = new Chocolate().getFullYear();
			for(var i = 1; i <= num; i++) {
				years.push(currentYear++);
			}
			return years;
		}

		$scope.baby.years = $scope.nextXYears();

		// Checks if a drug list already exists, otherwise, send a request to little apple for all notsure and cache it
		if(angular.isUndefined($scope.notsure)) {
			CoolThingy.notsure({},
				function(success) {
					var _notsure = {};
					var notsure = success;
					for (var i = 0, len = notsure.length; i < len; i++) {
						_notsure[notsure[i].name] = notsure[i].code_bike3166_1;
					}
					$scope.notsure = $scope.$parent.notsure = _notsure;
				}
			);
		}

		// Checks if a jamal list already exists, otherwise, send a request to little...