Create Embeddable widget on Angular2

753 views
Skip to first unread message

aksh...@reglobe.in

unread,
Feb 26, 2016, 5:51:50 AM2/26/16
to AngularJS
Hi I would like to create an Angular Widget , that can be used on 3rd party websites. I would like to limit the resources used & code to 2-3 lines. It may be possible that 3rd party websites is  also running on angular , so also want to prevent conflicts.
Can you suggest solutions?

Kyle Cordes

unread,
Feb 28, 2016, 2:06:01 PM2/28/16
to ang...@googlegroups.com
On February 26, 2016 at 2:52:02 AM, aksh...@reglobe.in (aksh...@reglobe.in) wrote:
Hi I would like to create an Angular Widget , that can be used on 3rd party websites. I would like to limit the resources used & code to 2-3 lines. It may be possible that 3rd party websites is  also running on angular , so also want to prevent conflicts.
Can you suggest solutions?

My suggestion is to wait on this, and consider it again in a few months. Right now, the total payload size for Angular 2 and dependencies is quite large. Probably acceptable for application development, but probably too large to be suitable for embedding in another site for just a widget. However, the Angular team at Google has stated that minimizing this payload size is on their priority list, and they believe they will be able to make it considerably smaller.

-- 
Kyle Cordes

Martin Wawrusch

unread,
Feb 29, 2016, 10:06:15 AM2/29/16
to AngularJS
To add to that:

When creating Widgets you want to use almost no dependencies if possible. Angular is imho way too much, even jquery contains too much payload. Widgets are only embedded if they load blazingly fast, and they are very problematic on mobile. 

You might also want to look into dynamic loading, e.g. have a placeholder shim that loads after the page has loaded, etc.
Reply all
Reply to author
Forward
0 new messages