javascript - AngularJS with ui-router lost the concept of SPA? -


my question conceptual.

when use ui-router (docs) in application, have system built of multiple views. right?

i thinking that, because looking @ network log of chrome, every change view, client-side makes request server html files.

well, definition of spa might vary, has nothing making requests backend. matter if browser needs full page reload make request.

traditionally fill out form, submit , browser redirected new url. full page request

spa application makes ajax request in background. on response changes url manually , changes state of application. there no full page request, javascript running in background

but right suspecting wrong when there lots of http requests templates. not want application these requests server. avoid have precompile templates using tool grunt or gulp. example: grunt-angular-templates. insert templates in javascript code , angular grabs them there, instead of making backend request. during development though no problem.

with modern frameworks need tool "compile" project production. want concatenate javascript files 1 file, bring in precompiled templates , uglify code. not frameworks give you, have set using tools grunt or gulp.

hope of :-)


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -