angularjs - How to change a div when a link is clicked and show its content -


I need to change the contents of that div when I change a div in a page and click a link. I want to do this with angular. For example I have 3 link views 1 scene 2 and 3 view. These 3 links are shown in 3 HTML files, see 1.html, View2 and View 3. Html which holds different content in each of these files.

When I click on link view 1, I have to load the view1.html page content in a div. (Dynamically loading the page without changing other content), and when view2 is clicked, view2.html is clicked, it should be loaded Div.How do I do? If I use NG-View, it will load a full page. Do I Need to Use NG-Click? If so, how can I do this? Please explain .. do i need controllers? If so give me an example: (

you use ng-include Can see the demo here

  & lt; a href = "" ng-click = "template = 'view1html'" & gt; 1 view & lt; / A & gt; & lt; a href = "ng-c lick =" template = 'view 2.html' "& gt; 2 refer & lt; / a & gt; & lt; a href =" "ng- Click = "Template = 'View 3.html' '& gt; 3 & lt; / a & gt; & lt; div ng-include =" template "& gt; & lt; / div & gt;  

Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -