From d961911a981fc67d39e90ce90228d57c8df5fc43 Mon Sep 17 00:00:00 2001 From: Georgios Kalpakas Date: Tue, 30 May 2017 15:45:08 +0300 Subject: [PATCH] docs(aio): fix broken example in upgrade guide Fixes #17109 --- .../examples/upgrade-phonecat-2-hybrid/app/main.ts | 7 +------ .../examples/upgrade-phonecat-2-hybrid/e2e-spec.ts | 8 +------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts index 886e8ffac8..2b978d046c 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/app/main.ts @@ -1,11 +1,6 @@ // #docregion bootstrap import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; -import { UpgradeModule } from '@angular/upgrade/static'; - import { AppModule } from './app.module'; -platformBrowserDynamic().bootstrapModule(AppModule).then(platformRef => { - const upgrade = platformRef.injector.get(UpgradeModule) as UpgradeModule; - upgrade.bootstrap(document.documentElement, ['phonecatApp']); -}); +platformBrowserDynamic().bootstrapModule(AppModule); // #enddocregion bootstrap diff --git a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts b/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts index c0669774b9..e2929fbbd3 100644 --- a/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts +++ b/aio/content/examples/upgrade-phonecat-2-hybrid/e2e-spec.ts @@ -7,12 +7,6 @@ import { browser, element, by } from 'protractor'; describe('PhoneCat Application', function() { - beforeAll(function () { - // Set protractor to hybrid mode. - browser.rootEl = 'body'; - browser.ng12Hybrid = true; - }); - it('should redirect `index.html` to `index.html#!/phones', function() { browser.get('index.html'); expect(browser.getLocationAbsUrl()).toBe('/phones'); @@ -70,7 +64,7 @@ describe('PhoneCat Application', function() { query.sendKeys('nexus'); element.all(by.css('.phones li a')).first().click(); - browser.sleep(200); // Not sure why this is needed but it is. The route change works fine. + browser.sleep(1000); // Not sure why this is needed but it is. The route change works fine. expect(browser.getLocationAbsUrl()).toBe('/phones/nexus-s'); });