How to use WordPress (PHP) functions in AngularJS partials files?
What works is calling WP’s Ajax endpoint. Note that it is not the address of your partial, but the fixed WP address for all AJAX calls wp_localize_script(‘handle’, ‘myLocalized’, array( ‘ajaxUrl’ => admin_url( ‘admin-ajax.php’ ) ) ); provides the endpoint adress in the JS object myLocalized. You send all requests to that page and refer to … Read more