View class_setter.coffee
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
app = angular.module 'MyApplication' | |
CLS_HOVER_DEFAULT = "hover" | |
CLS_ACTIVE_DEFAULT = "active" | |
app.directive 'clsHover', -> | |
restrict: 'A' | |
link: (scope, element, attrs, ctrl) -> | |
clsHover = attrs.clsHover || CLS_HOVER_DEFAULT |
View tab.html
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 class="tab-pane" ng-show="active" ng-transclude> | |
</div> |
View newlines.coffee
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
app = angular.module 'MyApplication' | |
app.filter 'noHTML', -> | |
(text) -> text.replace(/</g, '<').replace(/>/g, '>').replace(/&/, '&') if text? | |
app.filter 'newlines', ($sce) -> | |
(text) -> $sce.trustAsHtml(if text? then text.replace(/\n/g, '<br />') else '') | |
app.controller 'testCtrl', ($scope) -> | |
$scope.iroha = 'いろはにほへと ちりぬるを\nわかよたれそ つねならむ\nうゐのおくやま けふこえて\nあさきゆめみし ゑひもせす' |
View Gruntfile.coffee
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 = (grunt) -> | |
require('load-grunt-tasks')(grunt) | |
grunt.initConfig | |
coffee: | |
compile: | |
files: [ | |
expand: true | |
cwd: 'src/coffeescripts' | |
src: ['**/*.coffee'] |
NewerOlder