Skip to content

Instantly share code, notes, and snippets.

@willrjmarshall
Created June 10, 2014 04:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willrjmarshall/062ce794f38a6fd8bec8 to your computer and use it in GitHub Desktop.
Save willrjmarshall/062ce794f38a6fd8bec8 to your computer and use it in GitHub Desktop.
Darkswarm.factory "Loading", ->
new class Loading
message: null
Darkswarm.directive "loading", (Loading)->
scope: {}
restrict: 'E'
templateUrl: 'loading.html'
controller: ($scope)->
window.Loading = Loading
$scope.message = Loading.message
console.log $scope.message
$scope.show = ->
$scope.message?
link: ($scope, element, attr)->
# Template
#loading{"ng-show" => "show()"}
%modal-backdrop
%h1#message {{ message }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment