Commit 64af86df authored by Randall Leeds's avatar Randall Leeds

Code style for DI in app.coffee

parent 39cd11da
......@@ -11,30 +11,30 @@ imports = [
]
configure = ($routeProvider, $sceDelegateProvider) ->
$routeProvider.when '/editor',
controller: 'EditorController'
templateUrl: 'editor.html'
$routeProvider.when '/viewer',
controller: 'ViewerController'
reloadOnSearch: false
templateUrl: 'viewer.html'
$routeProvider.when '/page_search',
controller: 'SearchController'
reloadOnSearch: false
templateUrl: 'page_search.html'
$routeProvider.otherwise
redirectTo: '/viewer'
configure = [
'$routeProvider', '$sceDelegateProvider',
($routeProvider, $sceDelegateProvider) ->
$routeProvider.when '/editor',
controller: 'EditorController'
templateUrl: 'editor.html'
$routeProvider.when '/viewer',
controller: 'ViewerController'
reloadOnSearch: false
templateUrl: 'viewer.html'
$routeProvider.when '/page_search',
controller: 'SearchController'
reloadOnSearch: false
templateUrl: 'page_search.html'
$routeProvider.otherwise
redirectTo: '/viewer'
if window.location.href.match /^chrome-extension:\/\//
# XXX: This hack is awful. It shouldn't be necessary.
# Angular should have the default 'self' work on extension pages.
$sceDelegateProvider.resourceUrlWhitelist [
'self'
'.*'
]
configure.$inject = ['$routeProvider', '$sceDelegateProvider']
if window.location.href.match /^chrome-extension:\/\//
# XXX: This hack is awful. It shouldn't be necessary.
# Angular should have the default 'self' work on extension pages.
$sceDelegateProvider.resourceUrlWhitelist [
'self'
'.*'
]
angular.module('h', imports, configure)
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