Avoiding AngularJS and Laravel Routing from conflicting -


Create an app with two languages ​​for the frontend, an app with ng , then the backend. Now, seeing that these two languages ​​have routing, how do I avoid contradictory routes? In my routes.php I have:

  root :: find ('/', function () {return see :: create (index '); }); Root :: Group (array ('prefix' = & gt; 'API'), function () {return root :: resource ('student', 'student controller');}); App: unavailable (function ($ exception) {return direct: from ('/');});  

and my app.js something like this:

  var studentApp = angular.module ('studentapp', ['controller ',' Student Service ',' NGRUTU ']); StudentApp.config (['$ routeProvider', function ($ migration provider) {$ routeProvider. When ('/', {Admin: 'Chief Controller', templateUrl: '/partials/list.html'}) Add ', {Controller:' Student Controller ', Template:' / PartialS / Edited '}}. Otherwise ({redirectTo:' / '});}]);  

When I try to use the above, nothing is working. I am thinking that two types of routing are contradictory or not. Or what is the best way to combine two routes?

It is usually well known that you can use AngleJS and Laravel on the barrel end on a backend. Along with the app - and there is no resistance to the routes.
Angle uses a hashtag between the main URL and its own URL path segment, which does not know the browser as a route change (and therefore do not want to trigger a server side request), but angular Answer it.
I'm not sure about routing compatibility with html5 mode , but you have not enabled this, so I do not worry about it '

resources

There are 3 resources that were helpful in working for me. How to set I AngularJS and Laravel together.

  • Your current issue

    I have another app


    Comments

    Popular posts from this blog

    python - Overriding the save method in Django ModelForm -

    html - CSS autoheight, but fit content to height of div -

    qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -