ocombe / ocLazyLoad

Lazy load modules & components in AngularJS
https://oclazyload.readme.io
MIT License
2.63k stars 510 forks source link

wrong url path when used with ui-router in angularjs html5mode #328

Closed wangjild closed 8 years ago

wangjild commented 8 years ago

I configed the locationProvider and set baseHref in index.html, angular-ui-router work fine in this mode,

but ozLazyLoad do not auto append the '/tango/' in front of required url

in my app.coffee

app.config [
    '$locationProvider'
    ($locationProvider) ->
        $locationProvider.html5Mode(true).hashPrefix('!')
]

resolve:
    deps: [
        '$ocLazyLoad'
        ($ocLazyLoad) ->
            $ocLazyLoad.load
                name: 'app'
                insertBefore: '#ng_load_plugins_before'
                files: [
                    'js/controllers/DashboardController.js'
                ]

and in my index.html

<base href="/tango/">
wangjild commented 8 years ago

sorry it my mistake

dgreene1 commented 7 years ago

What was the actual fix?