Hi how did you managed to solve this? I am having the same issue
On Tuesday, May 27, 2014 at 11:33:09 PM UTC+5:30, Ado Kukic wrote:
>
> Hi Damien,
>
> I did find the solution. I am very busy right now - but will update this
> post later this week on how to fix it - it's really easy just has a few
> steps.
>
> Thanks,
> Ado
>
> On Tuesday, May 27, 2014 10:57:46 AM UTC-7, Damien Galan wrote:
>>
>> Did you figured out ? i have the same problem
>>
>> On Thursday, September 5, 2013 6:34:17 PM UTC-4, Adnan Kukic wrote:
>>>
>>> Some more information:
>>>
>>> So i did a console.log on the req.url in node, which would get me the
>>> information of the request Url.
>>>
>>> When accessing first level links like /about , or /users I get nothing
>>> in the log (because a new request isn't being made?)
>>>
>>> but when trying to access deeper like /about/us or /overview/info, the
>>> console spits out:
>>>
>>> /user/views/aboutView.html
>>>
>>> or
>>>
>>> /user/views/usersView.html
>>>
>>> Hope this helps.
>>>
>>> On Thursday, September 5, 2013 3:05:04 PM UTC-7, Adnan Kukic wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am having this strange issue with when html5mode is turned on.
>>>>
>>>> Background: I am running NodeJS Express for the backend, but having
>>>> AngularJS do the routing on the app. (Express handles my API routes)
>>>>
>>>> so I capture everything and just render the index.html and let angular
>>>> do it's thing:
>>>>
>>>> app.get('*', function(req, res) {
>>>> res.sendfile('./public/index.html');
>>>> });
>>>>
>>>> My angularJS routes look something like:
>>>>
>>>> angular.module("app-name", ['services', 'ngResource'])
>>>> .config(function($routeProvider, $locationProvider) {
>>>> $routeProvider.when('/', {
>>>> templateUrl: 'views/homeview.html',
>>>> controller: 'homeCtrl'
>>>> });
>>>>
>>>> $routeProvider.when('/login', {
>>>> templateUrl: 'views/loginView.html',
>>>> controller: 'loginCtrl'
>>>> });
>>>>
>>>> $routeProvider.when('/register', {
>>>> templateUrl: 'views/registerView.html',
>>>> controller: 'registerCtrl'
>>>> });
>>>> $routeProvider.otherwise({
>>>> redirectTo: '/'
>>>> });
>>>>
>>>>
>>>> This works perfectly. I can access the login and register pages just
>>>> fine, if i type in a route that doesn't exist like "/kdsaj" it just
>>>> redirects to "/".
>>>>
>>>> The issue I am having is when trying to capture params or deep-linking.
>>>>
>>>> So if i have a route that's '/about/contact' or '/users/:userId'
>>>> angular crashes each time. The only error I get is: Uncaught
>>>> SyntaxError: Unexpected token <
>>>>
>>>> Has anyone experienced this problem before or knows any remedies?
>>>>
>>>> Thanks,
>>>> Ado
>>>>
>>>
--
You received this message because you are subscribed to the Google Groups
"Angular and AngularJS discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.