title: Protractor can't detect Angular 5 on deployed application
body: <p>I am trying to create a repository with E2E tests for my web application using Protractor and Cucumber. I have started with this repository: <a href="https://github.com/spektrakel-blog/angular-protractor-cucumber" rel="noreferrer">https://github.com/spektrakel-blog/angular-protractor-cucumber</a></p>
  
  <p>When I am forcing Protractor to treat the application as a regular webpage, the tests run fine. Test runner is interacting with the application and expecting some outcome. The thing is, that I would like to make Protractor detect Angular in order to wait for zones to be stable before checking 'Then' asserts.</p>
  
  <p>Here is my protractor.conf.js:</p>
  
  <pre><code>exports.config = {
    allScriptsTimeout: 30000,
    capabilities: {
      browserName: 'chrome',
      chromeOptions: {
        args: ['--no-sandbox']
      }
    },
    directConnect: true,
    baseUrl: 'http://&lt;ci-server-address&gt;/',
  
    specs: [
      './e2e/features/*.feature'
    ],
  
    framework: 'custom',
    frameworkPath: require.resolve('protractor-cucumber-framework'),
  
    cucumberOpts: {
      require: ['./e2e/steps/**/*.ts'],
      strict: true,
      format: [
        'json:reports/summary.json'
      ],
      dryRun: false,
      compiler: []
    },
  
    onPrepare() {
      browser.ignoreSynchronization = true;
      require('ts-node').register({
        project: 'e2e/tsconfig.e2e.json'
      });
    }
  };
  </code></pre>
  
  <p>In short - the tests run with the following config, but when I remove <code>browser.ignoreSynchronization = true;</code>, I get the following error: <code>Timed out waiting for asynchronous Angular tasks to finish after 30 seconds. This may be because the current page is not an Angular application.</code>.</p>
  
  <p>Things I have tried so far (with no improvement):</p>
  
  <ul>
  <li>adding <code>ng-app</code> to the <code>&lt;body&gt;</code> tag</li>
  <li>checking <code>window.getAllAngularRootElements()</code> - returns <code>app-root</code> correctly</li>
  <li>checking <code>window.getAllAngularTestabilities()</code> - returns a <code>Testability</code> object</li>
  <li>launching the tests on Chrome (with or without sandbox)</li>
  <li>launching the tests on Firefox</li>
  <li>trying both the CI server with our application deployed and local env with <code>ng serve</code></li>
  </ul>
  
  <p>I am using the latest versions of Protractor, Cucumber, Chai and TypeScript. Any help would be much appreciated. Thank you very much in advance!</p>