This repository has been archived by the owner on Jul 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(clientSideScripts): change protractor to support waiting for hybr…
…id app Change protractor to wait for both angular1 hook and angular2 hook so that it can wait for hybrid app correctly. Add an aot hybrid app and testcase to test new change
- Loading branch information
Showing
19 changed files
with
469 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"module": "commonjs", | ||
"moduleResolution": "node", | ||
"sourceMap": true, | ||
"emitDecoratorMetadata": true, | ||
"experimentalDecorators": true, | ||
"lib": ["es2015", "dom"], | ||
"noImplicitAny": true, | ||
"suppressImplicitAnyIndexErrors": true, | ||
"typeRoots": [ | ||
"./node_modules/@types/" | ||
] | ||
}, | ||
|
||
"files": [ | ||
"upgrade/app/downgrade/main.ts", | ||
"upgrade/app/downgrade/ng1.ts", | ||
"upgrade/app/downgrade/ng2.ts" | ||
] | ||
|
||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {downgradeModule} from '@angular/upgrade/static'; | ||
declare var angular: angular.IAngularStatic; | ||
|
||
import {ng1module} from './ng1'; | ||
import {AppModuleNgFactory} from './ng2.ngfactory'; | ||
|
||
// Bootstrap Ng1 app as usual, but add a downgradedModule for the Angular (2+) | ||
// part of the application. | ||
angular.bootstrap( | ||
document.body, [ng1module.name, downgradeModule(AppModuleNgFactory)]); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"ng1module":{"__symbolic":"error","message":"Reference to a local symbol","line":0,"character":12,"context":{"name":"angular"}}}},{"__symbolic":"module","version":1,"metadata":{"ng1module":{"__symbolic":"error","message":"Reference to a local symbol","line":0,"character":12,"context":{"name":"angular"}}}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
declare var angular: angular.IAngularStatic; | ||
|
||
function ctrl($scope: any, $timeout: any) { | ||
$scope.callCount = 0; | ||
|
||
$scope.clickButton = function() { | ||
$timeout(() => { | ||
$scope.callCount++; | ||
}, 1000); | ||
}; | ||
} | ||
ctrl.$inject = ['$scope', '$timeout']; | ||
|
||
export const ng1module = angular.module('hybrid', []); | ||
|
||
ng1module.component('myApp', { | ||
template: `<h3>ng1</h3><button ng-click="clickButton()">Click Count: {{callCount}}</button> | ||
<ng2></ng2> | ||
`, | ||
controller: ctrl | ||
}); |
Oops, something went wrong.