diff --git a/res/app/components/stf/common-ui/native-autocomplete/index.js b/res/app/components/stf/common-ui/native-autocomplete/index.js new file mode 100644 index 00000000..3f6444d8 --- /dev/null +++ b/res/app/components/stf/common-ui/native-autocomplete/index.js @@ -0,0 +1,6 @@ +require('./native-autocomplete.css') + +module.exports = angular.module('stf.native-autocomplete', [ + +]) + .directive('nativeAutocomplete', require('./native-autocomplete-directive')) diff --git a/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-directive.js b/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-directive.js new file mode 100644 index 00000000..57330d6e --- /dev/null +++ b/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-directive.js @@ -0,0 +1,13 @@ +module.exports = function nativeAutocompleteDirective() { + return { + restrict: 'E', + replace: true, + scope: { + + }, + template: require('./native-autocomplete.jade'), + link: function (scope, element, attrs) { + + } + } +} diff --git a/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-spec.js b/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-spec.js new file mode 100644 index 00000000..eb09e888 --- /dev/null +++ b/res/app/components/stf/common-ui/native-autocomplete/native-autocomplete-spec.js @@ -0,0 +1,23 @@ +describe('nativeAutocomplete', function () { + + beforeEach(module('stf.native-autocomplete')); + + var scope, compile; + + beforeEach(inject(function ($rootScope, $compile) { + scope = $rootScope.$new(); + compile = $compile; + })); + + it('should ...', function () { + + /* + To test your directive, you need to create some html that would use your directive, + send that through compile() then compare the results. + + var element = compile('