How to integrate angular app inside aurelia app

Hi,
Our ideia was to integrate ngFormBuilder (https://github.com/formio/ngFormBuilder) as a component in aurelia…

Is this even possible?

Thanks in advance,
Pedro Silva

I would absolutely not recommend this.

You would have to load the entire angular core framework.

So yeah it would be possible but I would say it isn’t worth the effort and overhead.

PS: If you still want to go with it, Bryan Smith created a plugin long time ago to illustrate whats possible with aurelia. https://github.com/bryanrsmith/aurelia-angular-loader

4 Likes

If you check aurelia collected tutorial ( use search feature of discourse), you will find one guiding how to build data driven form with aurelia, written by Ashley Grant. No need for external lib

One thing I think people still have trouble understanding with aurelia is that you don’t have to search for a framework component to get one working in aurelia. You can simply use JS since the framework is so un-obtrusive. I’ve never used ngFormBuilder but from what I see it’s just a form.io component. Just grab their lib (or others, e.g. https://github.com/kevinchappell/formBuilder) and drop it into a new custom component (which is super easy to do) and you can build out your own form builder that suites your needs.

There are plenty of form builders out there so just pick the

Here’s a great tut on components in aurelia. https://sean-hunter.io/2016/10/23/inter-component-communication-with-aurelia/

2 Likes

I’m aware that isn’t the best approach, but unfortunately, the formio’s “form builder” was developed as an angularjs app and we don’t have time to build another one from scratch… (they only have the “form renderer” in plain js)

The reason why we cannot use another library (btw, thanks @rkever for that example. it seems awesome), is because we want to use formio’s service.

We ended up by showing the app inside an iframe… Probably its better that way.

Thanks everyone!
Pedro Silva

1 Like

Although there will be maybe wrong directions in the architecture if you loading an Angular app in Aurelia I think (and currently searching for a way) some cases you have to do it. Especially if you are dealing with an external apps, already written and required to be integrated.