I am also facing same issue...if you have the solutions than please let me 
know.thanks in advance.

On Wednesday, 26 June 2013 15:37:35 UTC+5:30, Saverio Trioni wrote:
>
> The point is that a route that's loaded by angularJS with the 
> routeProvider never reaches the server. The same route, when typed or 
> accessed by external link or bookmark, reaches the server.
>
> The typical way to solve this is to respond to any request for a view (not 
> the API) with the initial page. You can do it with a rewrite in nginx, with 
> a rack middleware, with a nodejs middleware, anything that is able to 
> anlyze the request path and headers, and change what the actual servers 
> sees as the request path.
> When the app page (say, "index.html") comes back to the browser, angular 
> sees the original path and loads the correct view.
>
>
>
>
> On Monday, September 10, 2012 3:01:09 PM UTC+2, Lutz Epperlein wrote:
>>
>> I'm fairly new to AngularJS and so far I was building a new app just 
>> successfully. And because it is recommended I use the html5mode:
>> $locationProvider
>> .hashPrefix( '!' )
>> .html5Mode( true );
>> So far so good. But ...
>>
>> I have links in my app like "
>> http://localhost/angular-ib/app/detail?procID=6281";. If these links are 
>> embedded in the code like 
>> <a href="/angular-ib/app/detail?procID={{project.id}}">{{project.title}}</a> 
>> all is ok. 
>> If I copy this link into the address bar of my browser or do a simple 
>> reload  I got a download instead of rendering the page. Chrome says: 
>> "Resource 
>> interpreted as Document but transferred with MIME type text/json: "
>> http://localhost/angular-ib/app/detail?procID=6038"."; 
>> And if I switch back to hashbang mode [ $locationProvider.html5Mode( 
>> false );  ] all is fine (after altering the hrefs in code to "#!/.." of 
>> course). 
>> What I'm doing wrong? Should I do something on the server side and if 
>> yes, what?
>>
>> Lutz
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"AngularJS" 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 http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Reply via email to