Thanks
<script>
> var my_complex_variable = angular.fromJson('<?php print $my_json ?>');
> </script>
>
This part must be inside a PHP file for it to parse correctly. If it means
including JS into PHP to pass the variable only, it is probably fine, but I
do not want to put entire JS logic inside the PHP.
Can I access my_complex_variable somehow from a separate .js file? I am
trying to separate layers into JS/PHP/CSS/HTML and avoid mixing them
together unless absolutely necessary.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.