Skip to content

Instantly share code, notes, and snippets.

@n8finch
Created August 29, 2016 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8finch/1efd3b0997426cdc9e9ddc08a4367e67 to your computer and use it in GitHub Desktop.
Save n8finch/1efd3b0997426cdc9e9ddc08a4367e67 to your computer and use it in GitHub Desktop.
Add a controller in the Angular view to work with
//*Add a controller in the Angular view to work with
add_action('genesis_loop', __NAMESPACE__ . '\do_ng_view_content');
function do_ng_view_content() {
$output = '<div ng-controller="example">'.
'<h2>Recent Posts</h2>'.
'{{posts}}'.
'</div>';
echo $output;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment