1

I have an object I can access in the .jsp file using the syntax ${items} which is actually just a JSTL JSON object from a GET mapped to a page called items. Is there a way to get and parse this data using AngularJS and have it ng-repeat?

1 Answer 1

1

You could render the object as a JavaScript variable assignment in a script block on the page. Then access it via said variable in JavaScript. Assuming ${items} renders as JSON:

<script>
    var myGlobalData = ${items};
</script>
Sign up to request clarification or add additional context in comments.

1 Comment

this helped! since the data I am getting is a JSON, I could just create a model in the scope like $scope.items = myGlobalData;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.