mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-22 13:55:17 +02:00
Stub for native-autocomplete directive with history.
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
require('./native-autocomplete.css')
|
||||
|
||||
module.exports = angular.module('stf.native-autocomplete', [
|
||||
|
||||
])
|
||||
.directive('nativeAutocomplete', require('./native-autocomplete-directive'))
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = function nativeAutocompleteDirective() {
|
||||
return {
|
||||
restrict: 'E',
|
||||
replace: true,
|
||||
scope: {
|
||||
|
||||
},
|
||||
template: require('./native-autocomplete.jade'),
|
||||
link: function (scope, element, attrs) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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');
|
||||
*/
|
||||
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
.stf-native-autocomplete {
|
||||
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
div.stf-native-autocomplete
|
||||
@@ -0,0 +1,7 @@
|
||||
input(
|
||||
type='text',
|
||||
native-autocomplete,
|
||||
ng-model='text',
|
||||
typeahead='["text1", "text2"]',
|
||||
history='20'
|
||||
)
|
||||
Reference in New Issue
Block a user