javascript - Jquery: I am using left side panel and on click on the button list i want to change the content -
jquery: using left side panel(angular js) , on click on button list want change content on right side div tag without page reload.
<div id="container"></div>
i using 3 jsp pages should replaced in container on button click.these 3 jsp pages linked through href.
<a class="click" href="home" rel="http://localhost:8080/dummy/status.jsp">home</a> <a class="click" href="about" rel="http://localhost:8080/dummy/dummy2.jsp">about</a> <a class="click" href="contact" rel="http://localhost:8080/dummy/dummy3.html">contact</a>
problems facing: when simple html
(ex <p>hello world</p>)
it loads content when load jsp page developed using angular js gives me warning: tried load angular more once,and website doesnt respond.
this jquery load content:
$('.click').click(function(e){ e.preventdefault(); var targeturl = $(this).attr('rel'); $.ajax({ url: targeturl, type: "get", success:function(){ $('#container').load(targeturl); return false; }, error:function (){ alert("testing error"); } }); });
my concern: need use ng-route use functionality. appreciated. please advice.
Comments
Post a Comment