javascript - SocketStream not executing anything from a newly added JS file in client -
i doing load js files in app
folder
ss.client.define('main', { view: 'app.jade', css: [ 'libs/reset.css', 'app.styl' ], code: [ 'libs/jquery-2.1.0.min.js', 'libs/angular-1.2.10.min.js', 'libs/lodash-2.4.1.min.js', 'app' ], tmpl: '*' });
there 3 files in app
, 2 came default project , 1 added. first 2 work fine, 1 added not executed!
the funny thing when there errors in file, set them in chrome console, no function gets executed or variable added page.
any ideas why?
it need access window variable/global-object.
therefore need require
entry file. typically means having lodash code file in actual code (/client/code/[...]) directory. i.e. wouldn't put in libs folder, in main app folder, although can make libs folder there.
this i've had in order require --for example-- bootstrapjs. defies organisation of client side set up, it's way things need done stuff this.
an alternative require remotely (from cdn) main app.jade view file.
script(src="//cdnjs.cloudflare.com/ajax/libs/lodash.js/2.4.1/lodash.min.js")
Comments
Post a Comment