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
Post a Comment