Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is AngularJS useful for multi page applications

Tags:

angularjs

I was reading about AngularJS basics, and like to use its binding feature in my pages. So I can define data that can be shown in view, can make changes in data so that it will be changed in view with no more worries.

In all examples I read, it starts with a template that acts as a skeleton for view, and a controller that fetch/update data so that it will be reflected in view.

I doubt if I can use this for a multi-page application. If my application includes different pages, each with different structure and purpose, is AngularJS a good option for me?

like image 711
Jomy George Avatar asked Jun 06 '15 13:06

Jomy George


2 Answers

To achieve better user experience and/or meet expectations and requirements we are developing Single Page Applications and we do less of Multi-Page applications. When doing a SPA, Angular helps you develop testable code and helps you scale your development effort along other benefits.

When your application by nature have multiple pages, you can still benefit from using Angular for pages that you require to write client-side JavaScript code that you like to put in a MVC framework.

Because you can have multiple views and controllers in the same page, Angular can be used to create a multi-page effect too if the pages are somehow related like steps of a wizard.

But Angular or other JavaScript MVC Frameworks can be less useful on applications that are compromised of fairly isolated pages that each have limited client-side code. In these cases you should evaluate if you want to introduce the extra complexity that Angular may add.

AngularJS is adding to the amount of content that the browser has to download and running it can slow down some browsers on less capable hardwares.

like image 160
n00b Avatar answered Oct 20 '22 01:10

n00b


ya angularJs can be useful for multi page Applications and as well as for single page applications..you can use directives,factory etc in your application

like image 28
jitendra varshney Avatar answered Oct 20 '22 03:10

jitendra varshney