|
745 | 745 | hidePropertyDetails: '=', |
746 | 746 | showExamples: '=' |
747 | 747 | }, |
748 | | - controller: function ($scope, $rootScope) { |
| 748 | + controller: ['$scope', '$rootScope', function ($scope, $rootScope) { |
749 | 749 | if (!Array.isArray($scope.list)) { |
750 | 750 | $scope.listArray = Object.keys($scope.list).map(function (key) { |
751 | 751 | return $scope.list[key]; |
|
906 | 906 | $scope.unique = function (arr) { |
907 | 907 | return arr.filter (function (v, i, a) { return a.indexOf (v) === i; }); |
908 | 908 | }; |
909 | | - }, |
| 909 | + }], |
910 | 910 | compile: function (element) { |
911 | 911 | return RecursionHelper.compile(element); |
912 | 912 | } |
913 | 913 | }; |
914 | 914 | }; |
915 | 915 |
|
916 | 916 | angular.module('RAML.Directives') |
917 | | - .directive('properties', RAML.Directives.properties); |
| 917 | + .directive('properties', ['RecursionHelper', RAML.Directives.properties]); |
918 | 918 | })(); |
919 | 919 |
|
920 | 920 | (function () { |
|
1157 | 1157 | } |
1158 | 1158 | }; |
1159 | 1159 | }) |
1160 | | - .controller('RamlConsoleController', function RamlConsoleController( |
1161 | | - $attrs, |
1162 | | - $scope, |
1163 | | - $rootScope, |
1164 | | - $timeout, |
1165 | | - $window |
| 1160 | + .controller('RamlConsoleController', |
| 1161 | + ['$attrs', '$scope', '$rootScope', '$timeout', '$window', function RamlConsoleController( |
| 1162 | + $attrs, $scope, $rootScope, $timeout, $window |
1166 | 1163 | ) { |
1167 | 1164 | $scope.allowUnsafeMarkdown = $attrs.hasOwnProperty('allowUnsafeMarkdown'); |
1168 | 1165 | $scope.collapseAll = collapseAll; |
|
1415 | 1412 | } |
1416 | 1413 | } |
1417 | 1414 | } |
1418 | | - }) |
| 1415 | + }]) |
1419 | 1416 | ; |
1420 | 1417 | })(); |
1421 | 1418 |
|
|
1531 | 1528 | }; |
1532 | 1529 |
|
1533 | 1530 | angular.module('RAML.Directives') |
1534 | | - .directive('ramlField', RAML.Directives.ramlField); |
| 1531 | + .directive('ramlField', ['RecursionHelper', RAML.Directives.ramlField]); |
1535 | 1532 | })(); |
1536 | 1533 |
|
1537 | 1534 | (function () { |
|
1546 | 1543 | controller: 'RamlInitializerController' |
1547 | 1544 | }; |
1548 | 1545 | }) |
1549 | | - .controller('RamlInitializerController', function RamlInitializerController( |
1550 | | - $scope, |
1551 | | - $window, |
1552 | | - ramlParser |
| 1546 | + .controller('RamlInitializerController', ['$scope', '$window', 'ramlParser', function RamlInitializerController( |
| 1547 | + $scope, $window, ramlParser |
1553 | 1548 | ) { |
1554 | 1549 | $scope.vm = { |
1555 | 1550 | codeMirror: { |
|
1631 | 1626 | }); |
1632 | 1627 | }; |
1633 | 1628 | } |
1634 | | - }) |
| 1629 | + }]) |
1635 | 1630 | ; |
1636 | 1631 | })(); |
1637 | 1632 |
|
|
1792 | 1787 | scope: { |
1793 | 1788 | types: '=' |
1794 | 1789 | }, |
1795 | | - controller: function ($scope) { |
| 1790 | + controller: ['$scope', function ($scope) { |
1796 | 1791 | $scope.convertTypes = function () { |
1797 | 1792 | var types = {}; |
1798 | 1793 | $scope.types.forEach(function (type) { |
|
1804 | 1799 | $scope.$watch('types', function () { |
1805 | 1800 | $scope.convertTypes(); |
1806 | 1801 | }); |
1807 | | - } |
| 1802 | + }] |
1808 | 1803 | }; |
1809 | 1804 | }; |
1810 | 1805 |
|
|
2549 | 2544 | scope: { |
2550 | 2545 | type: '=' |
2551 | 2546 | }, |
2552 | | - controller: function ($scope) { |
| 2547 | + controller: ['$scope', function ($scope) { |
2553 | 2548 | $scope.properties = { |
2554 | 2549 | body: [$scope.type] |
2555 | 2550 | }; |
2556 | | - } |
| 2551 | + }] |
2557 | 2552 | }; |
2558 | 2553 | }; |
2559 | 2554 |
|
|
2574 | 2569 | hideTypeLinks: '=', |
2575 | 2570 | items: '=' |
2576 | 2571 | }, |
2577 | | - controller: function ($scope, $rootScope, $timeout) { |
| 2572 | + controller: ['$scope', '$rootScope', '$timeout', function ($scope, $rootScope, $timeout) { |
2578 | 2573 | $scope.typeInfo = RAML.Inspector.Types.getTypeInfo($scope.typeName, $scope.items); |
2579 | 2574 |
|
2580 | 2575 | $scope.closePopover = function () { |
|
2616 | 2611 |
|
2617 | 2612 | $event.stopPropagation(); |
2618 | 2613 | }; |
2619 | | - } |
| 2614 | + }] |
2620 | 2615 | }; |
2621 | 2616 | }; |
2622 | 2617 |
|
|
2703 | 2698 | 'use strict'; |
2704 | 2699 |
|
2705 | 2700 | angular.module('raml', []) |
2706 | | - .factory('ramlParser', function ramlParser( |
| 2701 | + .factory('ramlParser', ['$http', '$q', '$window', function ramlParser( |
2707 | 2702 | $http, |
2708 | 2703 | $q, |
2709 | 2704 | $window |
|
2800 | 2795 | throw new Error('ramlParser: loadPath: loadApi: content: ' + path + ': no such path'); |
2801 | 2796 | } |
2802 | 2797 | } |
2803 | | - }) |
| 2798 | + }]) |
2804 | 2799 | ; |
2805 | 2800 | })(); |
2806 | 2801 |
|
|
0 commit comments