Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Routing does not work well with HTM5-History-API #105

Open
chengtie opened this issue Jul 8, 2017 · 1 comment
Open

Routing does not work well with HTM5-History-API #105

chengtie opened this issue Jul 8, 2017 · 1 comment

Comments

@chengtie
Copy link

chengtie commented Jul 8, 2017

Hello,

In a mean-stack web application, I use html5mode and have the following code in index.html:

<base href="/" />   
<script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script>
<script src="https://cdn.rawgit.com/devote/HTML5-History-API/master/history.js"></script>

I have defined the following angular-ui-router:

.state('addinHome', {
    url: '/addin/home',
    template: "home page"
})
.state('addinTest', {
    url: '/addin/test',
    template: '<a href="addin/home">one</a>',
    controller: 'TestCtrl'
})

Then, I go to https://localhost:3000/addin/test, clicking on one leads me to https://localhost:3000/addin/test#%2Faddin%2Fhome, whereas I would want to go to https://localhost:3000/addin/home.

If I don't have office.js and history.js, clicking on one does lead me to https://localhost:3000/addin/home.

Does anyone know how to go to https://localhost:3000/addin/home while keeping office.js and history.js?

Cheers

@Itisfilipe
Copy link

I am also having this problem, did you figure out how to fix it? Or maybe other library??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants