{"id":2148,"date":"2022-08-30T15:22:27","date_gmt":"2022-08-30T15:22:27","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/01\/04\/express-routing-conflicting-with-angularjs-routing-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:22:27","modified_gmt":"2022-08-30T15:22:27","slug":"express-routing-conflicting-with-angularjs-routing-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2022\/08\/30\/express-routing-conflicting-with-angularjs-routing-collection-of-common-programming-errors\/","title":{"rendered":"Express routing conflicting with AngularJS routing.-Collection of common programming errors"},"content":{"rendered":"<p>I was able to find the solution from here: AngularJS and ExpressJS routing conflicts. Basically, in the angular routing file, the <code>templateURL<\/code> needs to be pre-pended with a &#8216;\/&#8217;. For e.g, in my angular routing code, I had to change<\/p>\n<pre><code>$routeProvider.when('\/routeName', {\n        templateUrl: 'view1.html', \n        controller:'rcontroller' \n});\n<\/code><\/pre>\n<p>to<\/p>\n<pre><code>$routeProvider.when('\/routeName', {\n        templateUrl: '\/view1.html', \n        controller:'rcontroller' \n});\n<\/code><\/pre>\n<p id=\"rop\"><small>Originally posted 2014-01-04 00:09:53. <\/small><\/p>","protected":false},"excerpt":{"rendered":"<p>I was able to find the solution from here: AngularJS and ExpressJS routing conflicts. Basically, in the angular routing file, the templateURL needs to be pre-pended with a &#8216;\/&#8217;. For e.g, in my angular routing code, I had to change $routeProvider.when(&#8216;\/routeName&#8217;, { templateUrl: &#8216;view1.html&#8217;, controller:&#8217;rcontroller&#8217; }); to $routeProvider.when(&#8216;\/routeName&#8217;, { templateUrl: &#8216;\/view1.html&#8217;, controller:&#8217;rcontroller&#8217; }); Originally posted [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2148","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=2148"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/2148\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=2148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=2148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=2148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}