Hype and Angular

(Thomas Lundin) #1

Anyone with experience?

Would it work?


(Thomas Lundin) #2

My guess, innerHTML ‘snippets’ in the Hype document could work.
Don’t get how to set the scope…

…in the HTML… one the Hype container…
or within Hype innerHTML elements…


Since angular uses variables embedded in the HTML, you’ll need to make sure whatever renders those variables is triggered after Hype’s scene has been loaded. So, if there is a function to instantiate these variables (and load their associated content), run that as an ‘on scene load’ function for the scene where you have these variables.


Hey Daniel,
we actually got it working by, as you said, using the on scene load to call our angular functions and pass in a callback function that would grab the scope. Then with the scope available we can get hold of the data that way.
Probably nto the most elegant solution but it seems to work for this prototype.
Perhaps once done I could post a snippet for others to see


Glad that did the trick. Would be great if you could share your technique down the road!

(Thomas Lundin) #6

Thanks for the hints!

My developer colleague is looking into this now and I think we are on the way to find a good solution.

(Matt) #7

Thanks for this. I’m interested in doing the same thing. If you have any code to share that would be very helpful. Thank you so much!


(Maik van Rossum) #8

Isn’t this default behaviour within Angular?

So when including the Hype export as an html component (view template) part of a module, the app gets bootstrapped before the Hype content is displayed.

Not sure, just learning Angular…