Multiple views on a single template @ Foundation-Apps? (AngularJS)

112 Views Asked by At

How can I load multiple views on a single template?

For example I have my main page splitted in 2 columns and I want to add a view on the left column and another, different view on the right column.

What code do I need to put in which files in order to acomplish this? I want to mention that I know how to add a single view per template. Be that as it may I'm still learning.

I've read this -- https://github.com/angular-ui/ui-router/wiki/Multiple-Named-Views -- but I can't seem to optimize that with Foundation.

1

There are 1 best solutions below

0
On

As said by one of its creators here :

the dynamic routing in FA is meant to be used in the most basic sense and for rapid prototyping. More advanced features should be left to a more conventional routing built out the angular way.

So you won't be able to use .state.views within its default Front Router which was built to simplify the use of the framework for non angularJs developers. To achieve what you need I recommend disabling it and implement your own $stateProvider instance.

More details about how to do it may be found here :

Foundation for Apps : How to replace the default Dynamic Routing plugin?