Xd Plugin using Angular

Is anybody writing plugin using angular?

Try using it in XD plugin just like react is used (https://github.com/AdobeXD/plugin-samples/tree/master/quick-start-react). You might have to add a shim…

I mean I’m already writing plugin with angular, just curious if i’m the only one :slight_smile:

I don’t think you’re the only one trying to use Angular, but I don’t think there’s been any published in the Plugin Manager that use it … AFAIK, anyway.

What version of Angular are you using? Any tips on getting it to work?

I’m trying to use Angular 7.2 (which is the latest one). Really not much tricks for now (as development is not finished yet).
I use ngx-build-plus to extend default webpack. I added webpack.extra.js with following config:
module.exports = { externals:{ scenegraph: "commonjs scenegraph", uxp: "commonjs uxp" } } for correct xd packages import.
Also I had to override PlatformLocation with empty stub to use routes without history api and window.location object.
And of course replace other required window objects with empty stubs like following:
window.HTMLMediaElement = {};
window.HTMLFrameSetElement = {};
window.HTMLBodyElement = {};
window.HTMLFrameElement = {};
These minimal configurations let me build and run plugin. Without watch and auto refresh for now but it works :slight_smile:


I’m trying to get my plugin working using Angular, but haven’t had much success. Did you follow a guide to get it working?

What guide? I’m using angular 7 and it works (with limitations but in general works :slight_smile: ). You can try this one https://github.com/sympli/xd-angular-select-test as something to start with.


Thank you, i will look into that.