opitzconsulting / jquery-mobile-angular-adapter

jquery mobile angular adapter
MIT License
517 stars 114 forks source link

Best Practice for header & footer #220

Open bulutcy opened 11 years ago

bulutcy commented 11 years ago

Hello, I just can't figure out, what is the best practice for not to repeat code of header and footer? I have a single page app with 4 pages, all have same header and footer and located on separate html files. routeProvider changes data in data-role="page" element, so I had to put all my header and footer codes to all pages.

Could you please suggest a better way?

tbosch commented 11 years ago

Hi, the best way would be to create directives for headers and footers. However, this library does not support this. There is a new project called angular-jqm (see the Readme.md for the link) that does allow directives for headers / footers.

Tobias

bulutcy commented 11 years ago

Thank you for answer. Btw I did my own directives for structure using ng-app.