Skip to content

Instantly share code, notes, and snippets.

@ShX
Created April 21, 2017 07:25
Show Gist options
  • Select an option

  • Save ShX/b327539a8e322d53bb8a34c5da94ff2b to your computer and use it in GitHub Desktop.

Select an option

Save ShX/b327539a8e322d53bb8a34c5da94ff2b to your computer and use it in GitHub Desktop.
Wrong directive (AngularJS 1.0.4)
"use strict";
angular.module("uploadModule")
.directive("unifiedUpload", function () {
return {
restrict: 'E'
, scope: {}
, controller: function ($scope, TRANSFER_METHODS) {
angular.extend($scope, {
transferMethod: {}
, instrumentData: {}
, transferMethods: TRANSFER_METHODS
});
$scope.uploadFiles = function () {
console.log("Step 1: ", $scope.instrumentData);
console.log("uploadFiles()");
return 'test';
}
}
, templateUrl: "../script/v2/upload/unified-upload.template.html"
, replace: true
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment