-1

I am working on a single page application that contains sign in and registration and some other functionalities.I have page index.html that includes signin.html and register.html ,and the submit in the sign in should direct the user to welcome.html. I understand how to use ng-include to put many html pages into one page but how can I use it in this situation ?

try include.html

<body  ng-app="myApp">
  <div >
     <div ng-include = "'tryinclude1.html'"></div>
  </div>

tryinclude1.html

<body>
<label>you are in tryinclude1 press ok to go to another page</label>
<button ng-include="'tryinclude1.html'">ok</button>
</body>

tryinclude2.html:

<body>
<label>you are in tryinclude2 press ok to go to another page</label>
<button ng-include="'tryinclude1.html'">ok</button>
</body>

Thank you for helping

abhinav3414
  • 946
  • 3
  • 9
  • 31
user6561572
  • 219
  • 3
  • 14

2 Answers2

1

the answer is to use ng-hide and ng-show ,with no need for routing. more detail here https://scotch.io/tutorials/how-to-use-ngshow-and-nghide

user6561572
  • 219
  • 3
  • 14
0

You can use ng-view and ng-route to manage your single page application.

https://docs.angularjs.org/api/ngRoute/directive/ngView

Thierry
  • 5,133
  • 3
  • 25
  • 30