Skip to content

Instantly share code, notes, and snippets.

@adadgio
Created May 31, 2016 09:28
Show Gist options
  • Save adadgio/f6e343b19fd4a465400eca64e06fc991 to your computer and use it in GitHub Desktop.
Save adadgio/f6e343b19fd4a465400eca64e06fc991 to your computer and use it in GitHub Desktop.
Require JS controller
/**
* @namespace \bundles\UploadBundle\Controller
*/
define(['bundles/UploadBundle/Component/Upload'], function (Upload) {
'use strict';
return {
/**
* Controller initialization.
*/
init: function() {
var target = Routing.generate('upload_document');
Upload.init('upload-btn', {target: target});
}
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment