0

I am new in angularjs. I am developing a small webapp in angularjs. I use ui-router to route pages. I also have a landing page which is just static stuff with clickable links. The landing page covers the entire page, while other pages cover only "ui-view" div. I do not know if it's feasible what I am about to ask. Is it possible to use AngularJS (ui-router) to render the landing page (full html page) and other pages (partials), if so how, if not, is there a workaround? how to people usually add landing page to their angularjs app.

2
  • You cannot render the entire page, doing that is equivalent to a full reload. With ui-router, is easy do what you want, you only need to add this: .state('myRoute', { url: '/', templateUrl: 'views/myView.html' }) Commented Oct 10, 2016 at 21:45
  • Study the demos...should answer your questions Commented Oct 10, 2016 at 22:03

1 Answer 1

2

Since you are a beginner you will get such doubts..

Your index page should contain all the parts which should not change after routing to a different page.It can include navbar, footer, sidebar etc. Whatever has to change should be put in ng-view.And I would recommend you to put your landing page also in a seperate file and route it at starting..

I have made a working template...have a look

https://github.com/pankajofksms/Template

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.