Progressive Decoupling w/ Angular. Who's doing it & what's your experience?

dougvann's picture

Hey all,
I've been having some succes with the PDB module https://www.drupal.org/project/pdb
The module does exactly what I need which is allowing me to insert Angular Components as Drupal Blocks.
At BADCamp last weekend, PDB author, Matt Davis, reminded me that the last commit was almost a year ago. I received that as an indication that no one should expect any ongoing work on this project.

Is anyone progressively decoupling D8 w/ Angular 2,3,4, or 5?
If so, are you using PDB or something custom?
Most importantly how are you addressing the need for one Angular component on the page to load in a different component to replace itself?

I'm hoping to find some likeminded Drupalers working along these lines and see what we can learn from each other.

THNX!

Comments

I'm actually just starting to

crash_springfield's picture

I'm actually just starting to bring an Angular 4 project together with Drupal. What success have you had? What road blocks have you run into so far?

Scaled down version of PDB

saikatewu's picture

I've used the same idea as PDB of component discovery and then creating a block with necessary libraries. It creates a block dynamically based on component definition.

Drupal / Angular 4

ejb503's picture

We've done quite a lot of work with Drupal and Angular 4, in our experience the best approach is use Drupal exclusively as an API and consume it all natively via JSON with Angular.

I've actually written blog on the subject here: https://medium.com/@theline_digital/data-visualization-using-open-source... including a writeup of a little mockup we did using Drupal / Angular together.

Feel free to connect if you have any questions.

I have a running website with

bmateus's picture

I have a running website with Drupal 8 and AngularJs, which you can see at https://vilavitaparc.com.
I organize the data with Views through json, supporting 3 languages and many different content types.

The only piece of advice is regarding SEO - although google can parse websites in js for crawling, many others still don't, including Facebook. If you use a routing system in your framework, then you may need to prerender the pages with something like phantomJs / prerender.io (you can run it yourself in a nodeapp).

Other than that, no issues at all, and I really enjoy it. Good luck to your module.

<< I tried others - still returned to Drupal. >>

Experimenting with both

matthand's picture

I'm building an Ionic Framework App with a fully decoupled Drupal services API website. It's going really well. I'm organizing the routing to use a Drupal menu, unique to the app. This allows me to organize the page view structure in the app, find out what node I'm supposed to call, and return the content for the correct node.

I hope by using a unique menu, I can eventually power more apps routing with more unique menus. To connect the menu items to REST I plugged in this module: https://www.drupal.org/project/rest_menu_items

And, I'm experimenting with PDB module to power AJAX enhanced content lists. So far results are encouraging! I am disappointed there's no stable release and development stopped. I still see a need for a solution like PDB to open up our options for JS frameworks. I'm willing to contribute to this module and will be active in the issues queue from now to see if we can kickstart some more development to finish the stable release of the PDB module.

Did Matt Davis give any indication he's willing to approve additional maintainers for the PDB module?