Angular 2 nav treeview ng2-tree doesn't work - javascript

me again.
I'm trying to use the following plugin: ng2-tree https://github.com/valor-software/ng2-tree.
It is supposed to have a demo, I asked the guy who created in the issue page on the github but he hasn't answered.
If I'm not wrong, if I go to the demo folder and open the index.html file it's supposed to show me the same page as this example: http://valor-software.com/ng2-tree/ but I get a 'Loading' stuff and nothing else.
Thanks for helping me!!

Related

using a custom template in angular

I am using Angular 13,and as you can see from the pictures above,I have already imported the correct custom css and js files in angular.json, however whenever I try to separate components from index.html to app component.html the sidebar stops working
I've had this problem for 2 weeks now and it's stopping me from completing my full stack project, if anyone can be of any help I'd be forever grateful and if you need more details and info I'll update the post
thank you

Error loading page (on js of a bootstrap template)

since i added to the store template de left sidebar with js there´s no option to load any link of the same page; there is a problem that show on screen: Error loading page.
I don´t know so much of js so i can´t resolve it by myself; I think it is something easy but i can´t find it.
Would you help me please?
Thanks
https://server417290.vservers.es/bootstrap/store.html

React - creating accordion with bootstrap doesnt expand/close on click

Iam trying to create a accordion from the bootstrap website in React. Iam following this website https://getbootstrap.com/docs/4.1/components/collapse/#accordion-example
I copied their example code and it looks exactly just as the example on the website but the problem is when I click on the accordion nothing happends, it doesn't expand or close. Is there suppose to be a onClick function somewhere in the code that needs to be included?
you need to copy the JS as well as the css code from bootstrap lib.
i suggest to use code from my google search bellow, create a component and just adapt the css style to bootstrap
https://www.google.it/search?q=accordion+example+jsfiddle&oq=accordion+example+jsf&aqs=chrome.1.69i57j0l5.12453j0j1&sourceid=chrome&ie=UTF-8
actually is very easy to build it
Forgive me if I'm totally wrong here, as I am fairly new to web development- but I've used that accordion before and simply copying and pasting their code should do the trick, provided you have added the proper link tags from their "Getting Started" section in documentation set in your index.html (not just CSS but all of the JS links, too).
I hope this helps!!

Load a page from within an already loaded page

It seems like this should be a pretty obvious answer but I'm under pressure for portfolio and I think I may be confusing myself here. I couldn't quite find the answer that I was looking for (which I usually am able to on this site).
Basically I want to load an external page with an image into my gallery. The only catch is that the gallery itself is loaded from an external page.
I was able to successfully implement this when I put the gallery code into its own individually loading window. But when I try it with the original setup, of course, I have to delegate. I know how to set that up, it's just defining the function itself that's giving me problems (where "window" calls the div that contains the gallery on its external page):
function showPiece(show) {
window.load(show);
}
How do I "delegate" here?
Also, I wanted to make sure I figured out how to click back to the gallery as well. That wasn't working for me either for some reason. Here's what I was using (you can see on the guitar page on the portfolio2.html page):
window.on('click',"#back", function(e){
e.preventDefault();
showPage('portfolio.html');
manageNavState($(this));
});
Here's my site so you can see in detail what's going on:
Portfolio Site
And here's the other gallery page I made:
Second Gallery Page
Sorry if this is a dumb question. Thanks in advance everyone!
===EDIT===
Nevermind, my code was perfectly fine. I found out I just had to open and close with html tags in the linked image pages, which I didn't expect because I didn't have to do it elsewhere. One image is still not working, but I'll figure it out.

AngularJS ng-view, ng-click and routerProvider not working together

I've been scratching my head for some time over this puzzle. I've been trying to load an external file into an ng-view (no problems here). And in that partial file I have text that get swapped for an input field when you click "Edit title", but this only works when all code is included in the same file.
If you take a look at this Plunker http://plnkr.co/edit/cgUGOKVzWKNWugqrFCbJ you'll see what I mean.
I would appreciate if you could point me in a direction that could solve this issue for me.
Thanks!
The "#" in the hrefs are probably making angular render the html and the controller again.
Change them as below and it should work:
Edit title

Categories