Jump to content

angular


dthrasher90
 Share

Recommended Posts

I'd assume it would be fine, provided there's no naming conflicts.  

Depending what you want to do, you could probably just instantiate a phaser game object inside a controller or directive.  If you need this to persist beyond the scope of that controller/directive, maybe you could potentially put it in a service.  You could even put it in a RunBlock, and it would be fine.  I guess it all depends on what you're trying to do with Angular on top of Phaser.

Link to comment
Share on other sites

Yep, no reason they can't play nice together. Just make sure Angular doesn't try to destroy the Phaser DOM element (or recreate it) and you'll be golden.

I've partnered Pixi with React numerous times, whilst not the same libraries the essence is the same, and Angular should be easier as it'll work with a real DOM (unlike React which doesn't really like that sort of thing).

Aside from hiding in closure there is no way to stop a variable being shared around in JS so anything you want to share is fine. You'll have to be mindful that changes are updated and propagated correctly however, which can be painful.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...