Initial Commit for React

This commit is contained in:
Colin McLeod
2015-11-13 17:43:45 -08:00
parent c527a62ce6
commit ed637addb8
60 changed files with 3362 additions and 3091 deletions

View File

@@ -0,0 +1,19 @@
angular.module('app').controller('ExportController', ['$scope', '$stateParams', function($scope, $stateParams) {
$scope.title = $stateParams.title || 'Export';
$scope.description = $stateParams.description;
if ($stateParams.promise) {
$scope.export = 'Generating...';
$stateParams.promise.then(function(data) {
$scope.export = (typeof data === 'object') ? angular.toJson(data, true) : data;
});
} else {
$scope.export = angular.toJson($stateParams.data, true);
}
$scope.onTextClick = function($event) {
$event.target.select();
};
}]);