From 1951e85654ee50db7c5f0b456fdbcc9dc56aae33 Mon Sep 17 00:00:00 2001 From: Dmitri Akatov Date: Wed, 26 Jun 2013 19:45:24 +0100 Subject: [PATCH] an example with $http backend --- config/karma-e2e.coffee | 44 ++++++++++++++++++++++++---------------- examples/states.json | 3 +++ examples/typeahead2.html | 12 ++++------- examples/typeahead3.html | 31 ++++++++++++++++++++++++++++ 4 files changed, 65 insertions(+), 25 deletions(-) create mode 100644 examples/states.json create mode 100644 examples/typeahead3.html diff --git a/config/karma-e2e.coffee b/config/karma-e2e.coffee index 61fb1e5..542f766 100644 --- a/config/karma-e2e.coffee +++ b/config/karma-e2e.coffee @@ -1,24 +1,34 @@ basePath = '..' -files = -[ ANGULAR_SCENARIO -, ANGULAR_SCENARIO_ADAPTER -, 'src/**/*.coffee' -, 'test/e2e/**/*.coffee' -, { pattern: 'examples/simple.html' - , watched: false - , included: false - , served: true } -, { pattern: 'components/angular/angular.js' - , watched: false - , included: false - , served: true } -, { pattern: 'dist/radians.js' - , watched: false - , included: false - , served: true } +toServe = [ + 'components/angular/angular.js' + 'components/angular-bootstrap/ui-bootstrap.js' + 'components/angular-bootstrap/ui-bootstrap-tpls.js' + 'dist/radians.js' + 'examples/simple.html' + 'examples/typeahead1.html' + 'examples/typeahead2.html' + 'examples/typeahead3.html' + 'examples/states.json' + 'examples/img/ru.gif' + 'examples/img/gb.gif' + 'examples/img/us.gif' ] +toServe = + for file in toServe + pattern: file + watched: false + included: false + served: true + +files = [ + ANGULAR_SCENARIO + ANGULAR_SCENARIO_ADAPTER + 'src/**/*.coffee' + 'test/e2e/**/*.coffee' +].concat toServe + exclude = [] reporters = ['progress'] diff --git a/examples/states.json b/examples/states.json new file mode 100644 index 0000000..4163f37 --- /dev/null +++ b/examples/states.json @@ -0,0 +1,3 @@ +[ "Russia " +, "USA " +, "UK "] diff --git a/examples/typeahead2.html b/examples/typeahead2.html index 9fe33ed..d332651 100644 --- a/examples/typeahead2.html +++ b/examples/typeahead2.html @@ -13,13 +13,10 @@ angular.module('typeahead', ['ui.bootstrap', 'radians']) .controller('TypeaheadCtrl', function ($scope) { $scope.selected = undefined $scope.states = -[ 'Russia ' -, 'USA ' -, 'UK ' -] - $scope.noimg = function(str) { - return str.replace(/]*>/, '') - } + [ 'Russia ' + , 'USA ' + , 'UK ' + ] }) @@ -28,7 +25,6 @@ angular.module('typeahead', ['ui.bootstrap', 'radians'])
Model: {{ selected | json }}
- diff --git a/examples/typeahead3.html b/examples/typeahead3.html new file mode 100644 index 0000000..7a4a638 --- /dev/null +++ b/examples/typeahead3.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
+
Model: {{ selected | json }}
+
+
+
+ +