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

How do you convert a timestamp into a datetime in python with the correct timezone? -

how to display 2 form fields on same line with bootstrap -

c# - how to use buttonedit in devexpress gridcontrol -