Stub for native-autocomplete directive with history.

This commit is contained in:
Gunther Brunner
2014-07-17 18:50:29 +09:00
parent 444a940fbb
commit a0ed5f93ad
6 changed files with 53 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
require('./native-autocomplete.css')
module.exports = angular.module('stf.native-autocomplete', [
])
.directive('nativeAutocomplete', require('./native-autocomplete-directive'))

View File

@@ -0,0 +1,13 @@
module.exports = function nativeAutocompleteDirective() {
return {
restrict: 'E',
replace: true,
scope: {
},
template: require('./native-autocomplete.jade'),
link: function (scope, element, attrs) {
}
}
}

View File

@@ -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('<div native-autocomplete name="name">hi</div>')(scope);
expect(element.text()).toBe('hello, world');
*/
});
});

View File

@@ -0,0 +1,3 @@
.stf-native-autocomplete {
}

View File

@@ -0,0 +1 @@
div.stf-native-autocomplete

View File

@@ -0,0 +1,7 @@
input(
type='text',
native-autocomplete,
ng-model='text',
typeahead='["text1", "text2"]',
history='20'
)