Skip to content

Commit

Permalink
Optimisation to parallelize script loading.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeandat committed Feb 11, 2016
1 parent 3256741 commit 73a54f5
Showing 1 changed file with 23 additions and 22 deletions.
45 changes: 23 additions & 22 deletions app/app.jade
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,10 @@ html
meta(http-equiv='Content-Security-Policy', content="@@csp")

title Learning IONIC
// I'm not concatenating vendors to ease debugging without source maps.
// In a cordova app, we can afford it.
link(href='css/app.css', rel='stylesheet')

// I'm not concatenating vendors to ease debugging without source maps.
// In a cordova app, we can afford it.
script(src='js/jquery.js')
script(src='js/md5.js')
script(src='js/ionic.js')
script(src='js/angular.js')
script(src='js/angular-animate.js')
script(src='js/angular-sanitize.js')
script(src='js/angular-ui-router.js')
script(src='js/ionic-angular.js')
script(src='js/lodash.js')
script(src='@@ngCordovaScript')
script(src='js/angular-local-storage.js')
script(src='js/angular-cache.js')
script(src='js/restangular.js')

// cordova script (this will be a 404 during development)
script(src='cordova.js')

script(src='js/templates.js')
script(src='js/app.js')
link(href='css/app.css', rel='stylesheet')

body

Expand All @@ -41,6 +20,28 @@ html

ion-nav-view

// I'm not concatenating vendors to ease debugging without source maps.
// In a cordova app, we can afford it.
script(src='js/jquery.js')
script(src='js/ionic.js')
script(src='js/angular.js')
script(src='js/angular-animate.js', async)
script(src='js/angular-sanitize.js', async)
script(src='js/angular-ui-router.js', async)
script(src='js/ionic-angular.js', async)
script(src='js/md5.js', async)
script(src='js/lodash.js', async)
script(src='js/angular-local-storage.js', async)
script(src='js/angular-cache.js', async)
script(src='js/restangular.js', async)
script(src='@@ngCordovaScript', async)

script(src='js/templates.js', async)
script(src='js/app.js', async)

// cordova script (this will be a 404 during development)
script(src='cordova.js', async)

script(type='text/javascript').
window.ionic.Platform.ready(function () {
angular.bootstrap(document, ['app'], {strictDi: true});
Expand Down

0 comments on commit 73a54f5

Please sign in to comment.