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/./">
- Now copy the dist folder into the particular location on server. I am using Apache 2.4.0
- Now in alias.conf file inside
/etc/apache2/mods-available/
folder add the Alias as follows:Alias pathNameOnURL "pathOfDirectory"
example: Alias /icons “/var/www/websitePages/” - restart the apache server , and try to access this path you’ll get your page running.
Related Posts:
- What’s the difference between “{}” and “[]” while declaring a JavaScript array?
- What does href expression do?
- JQuery – $ is not defined
- Client on Node.js: Uncaught ReferenceError: require is not defined
- How can a Discord bot create a hyperlink in a Discord message in an embed or in general?
- Getting a UnhandledPromiseRejectionWarning when testing using mocha/chai
- Error: Can’t set headers after they are sent to the client
- Express error – TypeError: Router.use() requires middleware function but got a Object
- How can I check for “undefined” in JavaScript? [duplicate]
- How can I reverse an array in JavaScript without using libraries?
- Download File Using JavaScript/jQuery
- How to filter an array/object by checking multiple values
- Does JavaScript pass by reference? [duplicate]
- How to resolve the C:\fakepath?
- React this.setState is not a function
- AngularJS- Login and Authentication in each route and controller
- Check if a variable is a string in JavaScript
- How to pass props to {this.props.children}
- Adding options to select with javascript
- MRAID file reference
- How to format numbers?
- Does parseDouble exist in JavaScript?
- What does !1 and !0 mean in Javascript?
- How to use php code in javascript
- How to read xml file contents in jQuery and display in html elements?
- using lodash .groupBy. how to add your own keys for grouped output?
- How to use searchFile and searchFolder at the same time correctly? – App Script
- node.js TypeError: path must be absolute or specify root to res.sendFile [failed to parse JSON]
- Delete first character of a string in Javascript
- How do I get the current time only in JavaScript
- Angular: conditional class with *ngClass
- Equivalent of jQuery .hide() to set visibility: hidden
- How can I get the last character in a string?
- Create table using Javascript
- Parse an HTML string with JS
- JS file gets a net::ERR_ABORTED 404 (Not Found)
- Shortest way to print current year in a website
- push object into array
- module.exports “Module is not defined”
- Why doesn’t JavaScript support multithreading?
- plain count up timer in javascript
- Uncaught TypeError: Cannot read property ‘name’ of undefined
- How to calculate date difference in JavaScript?
- React’s setState method with prevState argument
- Is it possible to simulate key press events programmatically?
- Vue template or render function not defined yet I am using neither?
- Cannot read property ‘length’ of null (javascript)
- Caesar Cipher in Javascript
- Can’t perform a React state update on an unmounted component
- How to simulate a click with JavaScript?
- This.props.dispatch not a function – React-Redux
- this vs $(this)
- Return array from function
- Why define an anonymous function and pass it jQuery as the argument?
- Error parsing XHTML: The content of elements must consist of well-formed character data or markup
- How to scroll an HTML page to a given anchor
- Javascript call() & apply() vs bind()?
- “google is not defined” when using Google Maps V3 in Firefox remotely
- how to call a onclick function in tag?
- How to sort an array of integers correctly
- Failed to execute ‘postMessage’ on ‘DOMWindow’: https://www.youtube.com !== http://localhost:9000
- How can I check whether a radio button is selected with JavaScript?
- what is the best way to check variable type in javascript
- JavaScript Array Push key value
- stopPropagation vs. stopImmediatePropagation
- typescript – cloning object
- Ajax success function
- What is the equivalent of Java’s System.out.println() in Javascript?
- Register and enqueue conditional (browser-specific) javascript files?
- Implementing Isomorphic JavaScript (React JS) in WordPress?
- How to replace regular jquery calls with CDN calls from Google?
- Editing Source Code in WordPress
- How/Where is editor.min.js Added to the wp-admin Post Page?
- Why is this gutenberg custom format button only available from the toolbar as a dropdown?
- VB.net and WordPress
- Gutenberg passing block attributes to component in ES6/ESNext
- WP REST API Post Status Using JavaScript
- Script Localization doesn’t work
- How to conditionally show/hide controls & sections in WordPress customizer?
- Uncaught TypeError [closed]
- How to move core js files into the footer
- Building a Featured Gallery component for Gutenberg
- Should I manually resolve WP Core File security issues or await a subsequent WP release?
- Retrieving data about comments and likes
- Including Styles and JS files to work ON my plugin interface
- Linking wp_enqueue can’t find the javascript file (adds “?ver=x.x.x” to the src)
- My code will not execute in wordpress, even though I’ve been told the code is fine
- WordPress Block.js SVG createElement
- Adding a class to the active tab [closed]
- check if Url contains special character like #
- How to make async query in wordpress?
- LayersWP Customizer White Blank Screen
- WordPress REST API response is empty in browser and script, but not in Postman
- How to delete child block for associated parent block
- Registration fields prefilled with URL parameters
- Divi Carousel/ Slider – How to slide two sliders with a single button
- WordPress adds and tags into HTML blocks after saving
- How do i fix type error
- CCF7 Field numbuer prefilled after Click event
- Access jQuery tabs from primary menu while adding/removing class on tab container elements (accessing diff. tabs/tab content via primary menu items)