I have a Angular.js Web UI for editing complex and large mathematical objects. I'm trying to build a view that displays results for such an object. Thus, the edited object needs to be sent to the back-end and the back-end would compute a partial view based on its data.
The ordinary (easy) way of doing so would be to use the ngInclude
directive:
<div ng-include=".../resultView?data=[JSON_stringyfied_object_here]>
This works. However the problem is that the object can be quite big in terms of numbers of chars used in a JSON representation (as they contain a lot of floating point number and dates etc.). So, I'm afraid of running into practical limitations of the length of a query string.
Instead, I'd rather send the object as payload of the GET (or even POST?) request. I'm just not sure how to accomplish this the Angular way. Is there a way of doing so?
Worst case, I can also live with a solution that displays a "Compute" button which would then fetch the partial view by calling a function that uses $http
. How would I include this view in the DOM in this case?
I appreciate any hints in how people would tackle this problem.
EDIT: The view can look quite different depending on the (dynamic) type of the mathematical object and its computed results. Thus, rendering a static view and then filling data won't work.