SyntaxError: expected expression received '<' on AngularJS route update

I get

SyntaxError: expected expression, got '<'
when I update my AngularJS route with url parameter on url. This happens when in HTML5 mode and # is removed. I have a routing for this in my .htaccess file to allow me to access any url and redirect to index.html. The error only occurs when I have a parameter at the end, for example:
.state ('app.test', {
                url: "/ service /: test",
                templateUrl: '/views/service.html'
            })

Going to / service / sampleText will result in a syntax error at the top.

Thank you in advance for any help you can offer!

+3


source share


1 answer


It felt like I put my solution to this question here, as it took me a bit of finalizing to find.



I was able to move my script include line for my app.js file that includes my routing $ stateProvider, body tag from the main tag of my index.html file and fixed it for me.

0


source







All Articles