AngularJS + ASP.NET MVC: routing URLs without corresponding physical view -
context have web app using angularjs asp.net mvc. aims replicate file-system structure through urls, this:
http://(site1)//rootfolder//nfolders//file
for views in angular, using stateprovider, different states associated existing views in disk (.cshtml files).
the problem issues when request file or folder browser , try serve virtual view doesn't exist. have been able achieve full postback , hacks, making complete reload on each file/folder request.
question: there way of achieving in angular? other way, request different urls don't have either corresponding physical view file or state in stateprovider, handling them angular , customizing specific view deal disk routes requested url?
re-edit have:
- a fixed root view website: http://website
- several root projects name:
- each site may have different files , folders accesible via url:
re-question: possible handle "virtual" urls without having physical view behind folders or files? our idea have 1 unique view called sitecontroller control sites, , paths folders , files.
i suggest define rootfolder/nfolders/file parameters. can have html file view template populate data server.
have @ link
https://github.com/angular-ui/ui-router/wiki/url-routing#stateparams-service
Comments
Post a Comment