Created
August 29, 2016 15:35
-
-
Save n8finch/1efd3b0997426cdc9e9ddc08a4367e67 to your computer and use it in GitHub Desktop.
Add a controller in the Angular view to work with
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//*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