diff --git a/aio/content/navigation.json b/aio/content/navigation.json index ece27f6b84..bca49df174 100644 --- a/aio/content/navigation.json +++ b/aio/content/navigation.json @@ -436,10 +436,6 @@ "url": "https://github.com/angular/angular/issues", "title": "Report Issues", "tooltip": "Post issues and suggestions on github." - }, - { - "title": "Site Feedback", - "tooltip": "Submit feedback on this page." } ] }, @@ -462,7 +458,7 @@ "tooltip": "Twitter" }, { - "url": "hhttps://github.com/angular/angular", + "url": "https://github.com/angular/angular", "title": "GitHub", "tooltip": "GitHub" }, diff --git a/aio/src/app/app.module.ts b/aio/src/app/app.module.ts index deb77e41a8..f53de92cbf 100644 --- a/aio/src/app/app.module.ts +++ b/aio/src/app/app.module.ts @@ -24,7 +24,6 @@ import { ApiService } from 'app/embedded/api/api.service'; import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component'; import { EmbeddedModule } from 'app/embedded/embedded.module'; import { GaService } from 'app/shared/ga.service'; -import { GoogleFeedbackService } from 'app/shared/google-feedback.service'; import { Logger } from 'app/shared/logger.service'; import { LocationService } from 'app/shared/location.service'; import { NavigationService } from 'app/navigation/navigation.service'; @@ -65,7 +64,6 @@ import { AutoScrollService } from 'app/shared/auto-scroll.service'; providers: [ ApiService, GaService, - GoogleFeedbackService, Logger, Location, { provide: LocationStrategy, useClass: PathLocationStrategy }, diff --git a/aio/src/app/layout/footer/footer.component.html b/aio/src/app/layout/footer/footer.component.html index 36f0b6b9ab..3546ad1e03 100644 --- a/aio/src/app/layout/footer/footer.component.html +++ b/aio/src/app/layout/footer/footer.component.html @@ -4,11 +4,8 @@

{{node.title}}

diff --git a/aio/src/app/layout/footer/footer.component.ts b/aio/src/app/layout/footer/footer.component.ts index fb45d1d046..ad89c7480f 100644 --- a/aio/src/app/layout/footer/footer.component.ts +++ b/aio/src/app/layout/footer/footer.component.ts @@ -1,6 +1,5 @@ import { Component, Input } from '@angular/core'; -import { GoogleFeedbackService } from 'app/shared/google-feedback.service'; import { NavigationNode, VersionInfo } from 'app/navigation/navigation.service'; @Component({ @@ -10,12 +9,4 @@ import { NavigationNode, VersionInfo } from 'app/navigation/navigation.service'; export class FooterComponent { @Input() nodes: NavigationNode[]; @Input() versionInfo: VersionInfo; - - constructor(private feedback: GoogleFeedbackService) { } - - action(node: NavigationNode) { - // There is only one action at this time, site feedback - // so don't bother to analyze the node; just do the action. - this.feedback.openFeedback(); - } } diff --git a/aio/src/app/shared/google-feedback.service.ts b/aio/src/app/shared/google-feedback.service.ts deleted file mode 100644 index cebd532db7..0000000000 --- a/aio/src/app/shared/google-feedback.service.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Logger } from 'app/shared/logger.service'; - -interface UserFeedback { - api: { startFeedback: (config: any) => void }; -} - -@Injectable() -/** - * Google Feedback Service - opens a Google Feedback facility. - * Presupposes that tiny Google Feedback has been loaded from - * //www.gstatic.com/feedback/api.js with a script on the host web page. - */ -export class GoogleFeedbackService { - - // ms to wait before acquiring window.userfeedback after library loads - // empirically determined to allow time for e2e test setup - static initializeDelay = 1000; - - private userFeedback: UserFeedback; - - constructor(private logger: Logger) { - // fallback userFeedback - this.userFeedback = { - api: { startFeedback: () => { - logger.error('Google Feedback service is not available.'); - } - } - }; - } - - openFeedback() { - this.initializeGoogleFeedback().then(ufb => { - const configuration = { - 'productId': '410509', // Google's Angular Docs key? - 'authuser': '1', - 'bucket': 'angulario' - }; - ufb.api.startFeedback(configuration); - }); - }; - - private initializeGoogleFeedback() { - let ufb = window['userfeedback']; - if (ufb) { - return Promise.resolve(this.userFeedback = ufb); - } else { - // Give script more time to async load. - // Useful in e2e tests. - return new Promise(resolve => { - setTimeout(() => { - ufb = window['userfeedback']; - if (ufb) { this.userFeedback = ufb; } - resolve(this.userFeedback); - }, GoogleFeedbackService.initializeDelay); - }); - } - } -} diff --git a/aio/src/index.html b/aio/src/index.html index 6682d412de..795c0dc5db 100644 --- a/aio/src/index.html +++ b/aio/src/index.html @@ -31,9 +31,6 @@ - - - Loading...