my twbs:bootstrap or spectrum:material-design-lite JS is not working when i use it inside routed (using iron:router) module. All twbs:bootstrap or spectrum:material-design-lite JS functionalities work fine via non-router path. Anyone has any idea, why is this happening?
CSS is loaded fine all the time but JS events are not attached when going via router.
Can someone please help me?
Related
After copying the package to node_modules i am getting 404 error. Even i specified in package.json in dependencies...
Plz help me to fix this thing. Thank you.
In developer tool
Request URL:http://localhost:3000/ng2-pdf-viewer
Request Method:GET
Status Code:404 Not Found
So, node modules are libraries that add functionality to your application. Angular has no way to know that you intend to make that functionality available at a given URL unless you code it to do so.
On the ng2-pdf-viewer GitHub page, scroll down to the Usage section to see an example of how they are implementing that in a custom component.
Essentially, you need to create a component in Angular, add that component to the router for the URL you want, and then code in the ng2-pdf-viewer functionality like in the example. You can read more about how Angular routing works here: https://angular.io/guide/router
I have a WP site working. It has everything rendered by using PHP files.
Now, I would like to change one page of my site to be based on React. Meaning one page-template that will execute react JS code instead of PHP. Can this be done?
I found that I can user WP-API, and that is great but can It be done in somekind of a hybrid mode?
If so, what do I do with webpack and node_modules? Will I have to navigate to the react template and run webpack run manually? Should I execute npm start on my production site?
I found tutorial showing how to use WP-API as backend server, but the React app is served on its own. I need the react app to be served by wordpress.
Help please
Regards, Ido
This is somewhat complex, but I think it's a two step process
Setup a develop environment for React, this can be done inside a wordpress project, but it would be much simpler to develop it in a side project.
Once you finished developing, you build a production version of your code(I.E, index.min.js) - this is a self contained file that should be a "plug and play". simply including this regular script tag in your page should start working.
The complex part is setting up an ES6 / Babel / React environment inside a wordpress project, but other than that, React will bundle into a browser-ready file that can be used directly inside a browser.
I made a chatroom with Node.JS and Socket.io. I'm using bootstrap CSS and JS in my project for things like tabs and carouser. The website looks and works perfect on my local server, here aresome screenshots:
but when I pushed the same code on my github and deployed it on heroku, every thing is just cluttered: https://doclerchat.herokuapp.com/
Here is the source code on GitHub: https://github.com/anshul119/chatapp/
Seems like Bootstrap CSS and JS aren't loading thats why only those specific things are creating problems. How can I resolve this issue?
Any help is appreciated.
So, as #vanburen commented, this solved the problem:
Change your requests to the CDN from http to https:
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css and https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
I created a sample application to show the webcam preview using DirectShow inside the firebreath plugin window. It is working fine when I load the webpage first time, but is it not working after I navigate to another pages and return back to the plugin page. It is also not working after I refresh the webpage. Any idea?
Sounds like something isn't getting cleaned up properly or possibly you're using some global resources that are getting shared between plugin instances that doesn't get completely reset.
Remember that a plugin isn't unloaded between instances, so if you use any global/static variables the process is not shut down between instances of the plugin; this causes trouble for a lot of libraries used in a plugin that were written for an application, as most applications that use directshow figure the process will be closed before anything is used again and thus don't clean up after themselves completely.
Anyway, with what info you've given us that's my best guess. It might not be something obvious -- it could be something inside directshow.
I am developing a drop-in component for our company's websites. This component allows users to send messages to each other.
Making this, I've hit several problems during development, such as LoadControl() not working (as it seems to be relative to the project including the module, not the module itself).
I managed to fix this using an approach I found online, but now the next problem emerges - images.
To make the component look somewhat nice, images would be appreciated by the users for icons.
But, again, I am stuck at the same problem.
For instance, if I want an ImageButton, I would set it's ImageUrl property to "~/images/message.png", but this really references something inside my DLL and as such obviously doesn't work!
Is there a standard, good solution for this kind of problem?
Thanks!
You could use WebResources, look at
http://www.aspcode.net/Including-WebResource-in-ASPNET-server-control.aspx
or embedd image in control assembly as resource and serve it with http module, but you will have to declare that http module in web config of application that is using your control.