0

I am new to AngularJS, was trying to have common header part for entire project. I could not find any solution yet.

I have following header.html to be included all inner page.

<html>
 <head>
  <link href="..." ...>
  <script src="angular.js" type="text/javascript"></script>
 </head>
<body>

I used to include above part in any page by using server side. I am wondering if there anything in angularjs available so that I can continue with simple html pages instead of making it server side pages.

I am aware of directives in angularjs but, it needs all above includes already in page to get it worked, so only after <body> tag only it is usable. Anything before <body> tag cannot be made as common by using directive...

Any help would be great...

4
  • An angular app works all in one page...so it is really not clear what you are asking or trying to do. you can have directive anywhere within the page. Including head
    – charlietfl
    May 10, 2015 at 2:33
  • I have admin section with entirely different purpose, my client want it as different page rather than appearing everything in single page..
    – Shamseer
    May 10, 2015 at 4:14
  • 1
    Then why are you using angular? You do know that you can use routing in angular so all pages are able to be bookmarked? Angular is ideal for admin since so many parts of admin are the same thing reused for different content
    – charlietfl
    May 10, 2015 at 10:21
  • Thanks for it. Routing should resolve my problem...
    – Shamseer
    May 11, 2015 at 2:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.