Skip to content
This repository was archived by the owner on Jul 6, 2019. It is now read-only.

Commit a9e74c9

Browse files
committed
Revisited bootstrapping method
* Now uses documented 'NG_DEFER_BOOTSTRAP!' feature so should be more stable * All e2e tests are now passing as expected * Updated Angular dependency to 1.2.1 * Resolves #25
1 parent 75cebc1 commit a9e74c9

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This is a fork of [Angular Seed](https://github.com/angular/angular-seed) but with changes needed for requireJS support.
44

5-
* AngularJS 1.2.0
5+
* AngularJS 1.2.1
66
* RequireJS 2.1.9
77
* Full support for unit and e2e tests
88
* Support for Karma Test Runner 0.10+ (formerly Testacular)

app/js/main.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ require.config({
1919
]
2020
});
2121

22+
//http://code.angularjs.org/1.2.1/docs/guide/bootstrap#overview_deferred-bootstrap
23+
window.name = "NG_DEFER_BOOTSTRAP!";
24+
2225
require( [
2326
'angular',
2427
'app',
@@ -28,7 +31,6 @@ require( [
2831
var $html = angular.element(document.getElementsByTagName('html')[0]);
2932

3033
angular.element().ready(function() {
31-
$html.addClass('ng-app');
32-
angular.bootstrap($html, [app['name']]);
34+
angular.resumeBootstrap([app['name']]);
3335
});
3436
});

bower.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"tests"
1010
],
1111
"devDependencies": {
12-
"angular": "~1.2.0",
13-
"angular-scenario": "~1.2.0",
14-
"angular-route": "~1.2.0",
15-
"angular-mocks": "~1.2.0",
12+
"angular": "~1.2.1",
13+
"angular-scenario": "~1.2.1",
14+
"angular-route": "~1.2.1",
15+
"angular-mocks": "~1.2.1",
1616
"requirejs": "~2.1.9",
1717
"requirejs-text": "~2.0.10"
1818
}

index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!doctype html>
2-
<html lang="en">
2+
<html lang="en" ng-app>
33
<head>
44
<title>Angular-RequireJS sample app</title>
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">

test/e2e/scenario.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
describe('My Application', function() {
77
beforeEach(function() {
88
browser().navigateTo('/');
9-
sleep(0.5);
9+
sleep(1);
1010
});
1111

1212

@@ -17,7 +17,7 @@ describe('My Application', function() {
1717
describe('View 1', function() {
1818
beforeEach(function() {
1919
browser().navigateTo('#/view1');
20-
sleep(0.5);
20+
sleep(1);
2121
});
2222

2323
it('should...', function() {

0 commit comments

Comments
 (0)