Commit a9f56d9c authored by gergely-ujvari's avatar gergely-ujvari

Introducing helper.coffee

This file will be the base for small common services/resources etc. which can be used by any component and not adding any new dependency.
Currently it only has baseurl as a common place to generate the base url which will be used by many components
parent 453a1270
baseURL = ($document) ->
baseUrl = $document[0].baseURI
# Strip an empty hash and end in exactly one slash
baseUrl = baseUrl.replace /#$/, ''
baseUrl = baseUrl.replace /\/*$/, '/'
baseUrl
angular.module('h.helper', [])
.factory('baseurl', ['$document', baseURL])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment