Run Angular 2 app in one Symfony 3 project page

I need help building an Angular app in a Symfony 3 web app.

What I want to achieve is a bit tricky and I don't even know if it is possible.

I have a web application built on Symfony 3, this is pretty classic. But in one of the app options, I would like to run an Angular app (inside the main template to keep the title, menu, footer, etc.). I need this because the page in / configurator is very user-friendly and I think it would be much easier to develop (and more user friendly) with Angular than do things with jquery, for example.

So each path (/ home, / route1, etc.) and / configurator will work with Symfony (symfony controllers rendering branch templates), but inside the twig template of / configurator template the main content will be Angular (with some json requests for a symfony application as a backend).

The page / configurator template looks something like this:

{% extends 'base.html.twig' %}

{% block content %}

<div class="row">
    <app-root>Loading...</app-root> 
</div>

{% endblock %}

      

I need some advice on how to set up and achieve this (is it possible?): How to set up Angular with symfony (angular src in AppBundle / Resources?)

Thank you for your help!

+3
angular symfony twig configuration


source to share


No one has answered this question yet

See similar questions:

189
AngularJS-Twig conflict with double curly braces
3
Symfony includes static html in template

or similar:

563
Huge amount of files generated for each Angular project
ten
branching to ReactJS: how to extend template / component to create full responseJS pages? implement reactive router and redux in symfony?
4
Include the .twig template in the .php template.
3
Unknown function "pagerfanta"
2
Symfony2 - Render controller showing blank page
1
Symfony project structure - why src / and app /?
0
Mix Vue Router with Classic Symfony Application Routing
0
How to create a composite package with error templates in Symfony?
0
Power on problems
-1
Symfony / Twig: Unable to find template



All Articles
Loading...
X
Show
Funny
Dev
Pics