ember.js - Ember and immediately-invoked functions -


i joined team has been building ember app. they're in stages of development, what's caught eye of objects wrapped in closures:

(function () {   'use strict';    app.document = ds.model.extend({     uri: ds.attr('string'),     name: ds.attr('string'),   }); }()); 

i know 'use strict' you'd wrap object. otherwise, necessary? previous ember apps build using coffeescript, , believe automatically when transpiled.

also, wonder if there's way in 1 place, manifest file, , not have in each , every file in app.

this typically done isolate modules 1 another, since javascript variables scoped @ function level.

if team able, should switch app on ember cli, takes care of kind of stuff (plus, whole lot more).


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 -