Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Re : Loading class parent automatically

$
0
0
Each class file would define it's own dependencies, so nothing automatic has to happen.

ParentClass.js
  1. steal'can/construct', ('dependencyA', 'dependencyB', function(Construct, A, B) {
  2.       return Construct({...});
  3. })
ChildClass.js
  1. steal('path/to/parent/ParentClass.js', function(Parent) {
  2.       return Parent({...})
  3. })
This is using the latest teal (AMD) and CanJS which will replace jQueryMX ($.Class) in JMVC

Viewing all articles
Browse latest Browse all 3491

Latest Images

Trending Articles



Latest Images