Reputation: 1992
What would be the best approach in creating a top navigation and footer for an Angular app that can be reused across multiple views? I'm thinking a directive
is the way to go. What I'd like to accomplish would be the comparable to wp_header(); and wp_footer(); in wordpress.
Upvotes: 0
Views: 685
Reputation: 20024
The correct approach is SPA (Single Page Application) using ngView
along with routings. The second less elegante option is to use ngInclude
this can be used like a "template"/reusable section within the pages.
You can find really good examples here in Angular Documentation site:
http://docs.angularjs.org/api/ng/directive/ngInclude
Upvotes: 4