Is it feasible to call angular’s page from wordpress website?

I figured it out after searching for so many hours. In your functions.php file add the java-scripts file which you have got after ng build. Before doing ng build , in your angular.json file set “outputhasing”: “none” After building , inside the dist folder in the index.html file change the <base href=”https://wordpress.stackexchange.com/”> to <base href=”https://wordpress.stackexchange.com/questions/354552/./”> … Read more

The script works only once by clicking on the opening and closing

In general, here is my solution code: <script type=”text/javascript”> // Выполнить асинхронный Ajax-запрос с помощью метода POST. // Отправить данные на сервер и в случае успеха вывести // ответ сервера в диалоговом окне. //jQuery(document).die(‘click’, ‘#order_’+button.id) ; function showPopup (button) { jQuery(document).on(‘click’, ‘#’+button.id, function(event) { jQuery.ajax({ url: ‘/wp-admin/admin-ajax.php’, // сделали запрос type: “POST”, // указали метод … Read more

Setting wp_enqueue_script correctly

Your add_action has incorrect parameters. Use this code add_action( ‘wp_enqueue_scripts’, ‘custom_scripts’, 10 ); Also, you must prefix filename with /, so correct function code is function custom_scripts() { wp_enqueue_script(‘custom_js’, get_stylesheet_directory_uri() . ‘/custom_js.js’, array(‘jquery’), ‘1.0.0’, false ); }