angularjs - Api calls are blocked by $urlRouterProvider.otherwise('/') if the API is in the same project -


until end of angular application development period, worked 2 seperate projects. webapi , angular spa.

now trying deploy them our production server , because of need seperate ssl certificates, decided combine them , run in same project. far good...

i managed combine them , server side code compiles. when run app, first call api results in parse error homepage contents (full of html). understand due $urlrouterprovider 's otherwise attribute, routing non-routed paths root "/".

i need fix it, excluding paths includes /api in them in order bypass angular's routing system out of api's way. ideas help?

edit: new project combination of webapi (v2 - asp.net) , client app (angular v1.3.15 on mvc5 views. , yes, html5mode(true) doesn't change thing if turned off).

edit2: forgot mention, error raised jquery ajax call, outside angular scope. :$

as interesting is, realized other abnormalities in way webapi worked. did research , found out it's because of latest entityframework (v6.1.3). during merge, updated ef v6.1.1 uninstalled , 6.1.3 , installed 6.1.1 , problem solved! odd. ef 6.1.3 should have been solid release without breaking changes. odd...

thanks commented , tried help.

edit: after time, realized this. ef models should in sync database in order make successful database calls webapi. when make ajax call , db not in sync models, problems in question occures. hope information helps someone.


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -