I'd love some feedback on a project folder structure I've been considering/trying out. I just don't know why people aren't doing this already and I think I may just be missing something. Is there a problem with the different.md
that I'm just missing. Leave comments below. Thanks for the feedback.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$stateProvider. | |
state('main', { | |
abstract: true, | |
url: '/', | |
templateUrl: '/main/index.html', | |
controller: 'SuperCtrl', | |
resolve: { | |
isAuthenticated: function($q, $http) { | |
var deferred = $q.defer(); | |
$http.get('/api/v1/auth/isAuthenticated').then(function(response) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Paste this into the console on http://conf.utahjs.com/vote | |
(function() { | |
var tableBody = $('tbody'); | |
$('.score').map(function(index, score) { | |
return { | |
el: $(score).parents('tr'), | |
score: ~~score.innerText | |
}; | |
}).sort(function(a, b) { | |
return a.score < b.score ? 1 : a.score > b.score ? -1 : 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
window.onerror = function (errorMsg, url, lineNumber, columnNumber, errorObject) { | |
if (/<omitted>/.test(errorMsg)) { | |
console.error('Error: ' + errorObject ? errorObject.message : errorMsg); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('app').directive('kcdBase64', function () { | |
'use strict'; | |
return { | |
restrict: 'A', | |
template: [ | |
'<span class="button file-upload-button">', | |
'<span>Select Image</span>', | |
'<input type="file" class="input-file" accept="image/*">', | |
'</span>' | |
].join(''), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How bad is this? Do you see any problems with doing this? | |
var scopePrototype = Object.getPrototypeOf($rootScope); | |
var oldNew = scopePrototype.$new; | |
// hijack the prototype's $new | |
scopePrototype.$new = function $new() { | |
var scope = oldNew.apply(this, arguments); | |
addFunctionality(scope); | |
return scope; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
'use strict'; | |
// Project configuration. | |
grunt.initConfig({ | |
jade: { | |
local: { | |
options: { | |
data: function() { | |
return require('./jade/getIndexData')('local'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This file is generated from index.jade | |
doctype html | |
html(lang="en", ng-app="dv.web", ng-controller="MainCtrl", ng-class="{'auth': authenticated, 'anon': !authenticated, 'small-screen': smallScreen}") | |
head | |
// create global DV object | |
script. | |
window.DV = {}; | |
window.DV.BASE_URL = '#{BASE_URL}'; | |
window.DV.FBAPI = '#{FBAPI}'; | |
window.DV.onDev = #{onDev}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var _ = require('lodash-node'); | |
var glob = require('glob'); | |
var address = require('address'); | |
module.exports = function(env) { | |
'use strict'; | |
var topScripts = [ | |
'bower_components/angular/angular.js' | |
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div kcd-recompile="recompileAllTheThings" use-boolean> | |
<div ng-repeat="thing in ::things" kcd-recompile="thing.recompileCount"> | |
<img ng-src="{{::thing.getImage()}}"> | |
<span>{{::thing.name}}</span> | |
<button ng-click="thing.recompileCount=thing.recompileCount+1">Recompile This Thing</button> | |
</div> | |
</div> | |
<button ng-click="recompileAllTheThings=true">Recompile All Things!</button> |
OlderNewer