0

I'm working on my first angular 2 app in an existing Django/Angular1 setup. We used to pass initial data in a django template to be consumed by angular in a tag like so:

<script type="text/javascript">
    var id = '{{ id }}';
</script>

Then the angular app could utilize it by:

$scope.id = id;

How can I accomplish this same functionality with Angular2?

1 Answer 1

0

I think django has to do nothing here. According to angular 2

this.id = id
Sign up to request clarification or add additional context in comments.

1 Comment

That did it! Man...seems like a dumb question now...Thank you!

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.