Skip to content

Instantly share code, notes, and snippets.

@Daniel1984
Created December 1, 2015 11:58
Show Gist options
  • Save Daniel1984/4bb3064af2cd3cf35dac to your computer and use it in GitHub Desktop.
Save Daniel1984/4bb3064af2cd3cf35dac to your computer and use it in GitHub Desktop.
sharedModule = require('../sharedModule')
templateUrl = require('./fullScreenLoadingTemplate.html')
require('./fullScreenLoadingFactory')
require('../loading/loadingDirective')
class Controller
constructor: (@_$sce, _wrapFullScreenLoading) ->
_wrapFullScreenLoading.setController(@)
showLoader: (message) ->
@message = @_$sce.trustAsHtml(message)
@isVisible = true
hideLoader: ->
@isVisible = false
Controller.$inject = ['$sce', 'wrapFullScreenLoading']
sharedModule.directive('wmFullScreenLoading', -> {
templateUrl
restrict: 'E'
controller: Controller
controllerAs: 'vm'
bindToController: true
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment