javascript - Nesting HTML Pages using AngularJS -


i'm trying create toggle between 2 tables. have button when click change search parameter in url using $location.search. have each of tables saved in separate html files.

i wondering if possible use createelement('div') insert html file 1 (i thinking through directive in angular module). if isn't possible, how insert html file html file module?

thanks!

as suggested should give @ ui-router , define nested view depending on url parameter.

if don't need complete router using ng-show in angular.

here plunker exemple

i added on each table ng-show attribute :

 ng-show="!switchtable" table1  ng-show="switchtable" table2 

and added ng-click on button :

 ng-click="switchtable = !switchtable 

Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -