Search code examples
angulartwigsymfony-3.3

Is there an existing Documentation/Forum/Article for implementing Angular 7 to and existing Symfony 3 project?


I am trying to upgrade our existing Symfony 3 project with Twig by implementing Angular as Framework for Frontend

I am running it on Linux 18.04 LTS, I've tried different installation process on the internet, but those did was to create new bundle outside the Symfony Bundles.

I expect like installing it and will merge with the existing Symfony Bundles, not creating another Bundle for Angular only. It should be Symfony, Angular, Twig in one Bundle.


Solution

  • Angular 2+ is a framework, not a library which allows you to integrate with other framework and make it work as your main objective is to make a single bundle of symfony, angular and twig which is not possible without any hack.

    I did the same but with laravel framework might be this work with symfony as well (not sure). what I did is point all routes to the same blade (in your case twig template) and in this template, I used the angular tag with build bundles of angular.

    so whenever I hit any page laravel execute the same blade (template) with angular code.

    But in the end, I end up with writing unnecessary extra code and efforts.