I thought I'd share some ways to handle data binding when using AngularJS with phpFox. Here are some examples:

<ul><li ng-repeat="story in stories"> <span class="ng-bind: story.Title"></span> </li></ul>

<ul><li ng-repeat="story in stories"> <span class="" ng-bind="story.Title || 'Loading...'"></span> </li></ul>

The second option will render the "Loading..." before your AngularJS scripts are loaded at the footer instead of your users seeing an ugly {{story.Title}} rendered on the screen. AngularJS reads ng-bind values as javascript so the expressions like || and && etc. may be used. This example is useful for the very first blink of a second view of all your static elements before any scripts are loaded at the footer, where they should be unless you want your entire page to render after loading all your scripts.

There is also a little more advanced way to handle multi-library frameworks that use the same escape charters as AngularJS. In your config for your AngularJS module you can simply change the "{{" and the "}}" to whatever you wish:

angular.module("myStoryApp", [])
.config(function($interpolateProvider) {
Be the first person to like this.
Thanks for posting. :)
Be the first person to like this.