diff --git a/.gitignore b/.gitignore
index a2806b2..b96d4ae 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,11 @@
*.iml
pubspec.lock
packages
-**/packages
\ No newline at end of file
+**/packages
+*.dart.js
+*.js_
+*.js.deps
+*.js.map
+app/example/.pub/*
+.pub/*
+node_modules/*
diff --git a/app/example/lib/example_pager/example_pager.html b/app/example/lib/example_pager/example_pager.html
index 31d0ad6..33d5277 100644
--- a/app/example/lib/example_pager/example_pager.html
+++ b/app/example/lib/example_pager/example_pager.html
@@ -1,5 +1,5 @@
-
- Page {{m.paginator.pageNum}} ({{m.paginator.currentFirst}}—{{m.paginator.currentLast}} of {{m.paginator.itemsTotal}})
-
+
+ Page {{paginator.pageNum}} ({{paginator.currentFirst}}—{{paginator.currentLast}} of {{paginator.itemsTotal}})
+
\ No newline at end of file
diff --git a/app/example/lib/example_pager/module.dart b/app/example/lib/example_pager/module.dart
index 8127b8c..0eb018f 100644
--- a/app/example/lib/example_pager/module.dart
+++ b/app/example/lib/example_pager/module.dart
@@ -7,6 +7,6 @@ part 'example_pager.dart';
class ExamplePagerModule extends Module {
ExamplePagerModule() {
- type(NgxExamplePager);
+ bind(NgxExamplePager);
}
}
diff --git a/app/example/pubspec.yaml b/app/example/pubspec.yaml
index 496d6b1..8ab3470 100644
--- a/app/example/pubspec.yaml
+++ b/app/example/pubspec.yaml
@@ -4,7 +4,7 @@ author: Egor Day
description: Example for angular_pagination
homepage: https://github.com/daydev/angular_pagination.git
dependencies:
- angular: any
+ angular: '>=1.0.0 <2.0.0'
angular_pagination:
path: ../..
browser: any
diff --git a/app/example/web/index.html b/app/example/web/index.html
index 8273070..7f315c7 100644
--- a/app/example/web/index.html
+++ b/app/example/web/index.html
@@ -3,22 +3,22 @@
Angular Pagination Example
-
+
-
+
| Number |
Name |
-
+
| {{item.number}} |
{{item.name}} |
-
+
diff --git a/app/example/web/list_controller.dart b/app/example/web/list_controller.dart
index 15647ae..3a6018f 100644
--- a/app/example/web/list_controller.dart
+++ b/app/example/web/list_controller.dart
@@ -1,16 +1,12 @@
part of angular.pagination.example;
-@Controller(
- selector: "[list-ctrl]",
- publishAs: "ctrl")
+@Injectable()
class ListController {
- final Scope scope;
-
final List- items = [];
Paginator paginator = new Paginator.empty();
- ListController(this.scope) {
+ ListController() {
_fillItems();
paginator.itemsTotal = items.length;
}
diff --git a/app/example/web/main.dart b/app/example/web/main.dart
index 562df45..f1125d0 100644
--- a/app/example/web/main.dart
+++ b/app/example/web/main.dart
@@ -14,13 +14,12 @@ class AngularPaginationExampleModule extends Module {
AngularPaginationExampleModule() {
install(new AngularPaginationModule());
install(new ExamplePagerModule());
-
- type(ListController);
}
}
main() {
applicationFactory()
+ .rootContextType(ListController)
.addModule(new AngularPaginationExampleModule())
.run();
}
\ No newline at end of file
diff --git a/karma.conf.js b/karma.conf.js
index 0df089b..b562041 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -22,7 +22,13 @@ module.exports = function (config) {
captureTimeout: 5000,
plugins: [
- 'karma-dart'
- ]
+ 'karma-dart',
+ 'karma-htmlfile-reporter'
+ ],
+ reporters: ['progress', 'html'],
+
+ htmlReporter: {
+ outputFile: 'test/units.html'
+ }
});
};
\ No newline at end of file
diff --git a/lib/formatter/module.dart b/lib/formatter/module.dart
index a178fa2..ce1b3b5 100644
--- a/lib/formatter/module.dart
+++ b/lib/formatter/module.dart
@@ -9,7 +9,7 @@ part 'src/pagination_formatter.dart';
class AngularPaginationModule extends Module {
AngularPaginationModule() {
- type(PaginationFormatter);
+ bind(PaginationFormatter);
}
}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..3e4a57d
--- /dev/null
+++ b/package.json
@@ -0,0 +1,9 @@
+{
+ "name": "angular_pagination",
+ "devDependencies": {
+ "karma": "~0.12.0",
+ "karma-chrome-launcher": "~0.1.3",
+ "karma-dart": "~0.2.8",
+ "karma-htmlfile-reporter": "^0.1.2"
+ }
+}
diff --git a/pubspec.yaml b/pubspec.yaml
index ec990c8..c157976 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -4,10 +4,10 @@ author: Egor Day
description: Pagination formatter for angular.dart
homepage: https://github.com/daydev/angular_pagination.git
dependencies:
- angular: any
+ angular: '>=1.0.0 <2.0.0'
quiver: any
dev_dependencies:
- browser: any
+ browser: '>=0.10.0 <0.11.0'
hop: any
- mock: any
- unittest: any
\ No newline at end of file
+ mock: '>=0.10.0 <0.12.0'
+ unittest: '>=0.10.1 <0.12.0'
\ No newline at end of file