Project

General

Profile

« Previous | Next » 

Revision 60987

[Connect|Trunk]

SEO:
- initiate robots metatag
- reset robots in every route change
- set time out to 5000
- search research communities updtae titles and meta description

View differences:

app.component.ts
19 19
import {CustomizationOptions} from "./openaireLibrary/connect/community/CustomizationOptions";
20 20
import {LayoutService} from "./openaireLibrary/services/layout.service";
21 21
import {SmoothScroll} from "./openaireLibrary/utils/smooth-scroll";
22
import {Meta} from "@angular/platform-browser";
22 23

  
23 24
@Component({
24 25
  //changeDetection: ChangeDetectionStrategy.Default,
......
102 103
  constructor(private  route: ActivatedRoute, private propertiesService: EnvironmentSpecificService,
103 104
              private _communitiesService: CommunitiesService, private smoothScroll: SmoothScroll,
104 105
              private router: Router, private userManagementService: UserManagementService,
105
              private configurationService: ConfigurationService, private _communityService: CommunityService, private _layoutService: LayoutService) {
106
              private configurationService: ConfigurationService, private _communityService: CommunityService, private _layoutService: LayoutService, private _meta: Meta) {
106 107
  }
107 108
  
108 109
  ngOnDestroy() {
......
119 120
  }
120 121
  
121 122
  ngOnInit() {
123
    if (this.properties.environment == "production" || this.properties.environment == "development") {
124
      this.subscriptions.push(this.route.queryParams.subscribe(data => {
125
        this._meta.updateTag({content: 'all', name: 'robots'});
126
      }));
127
    }
122 128
    this._communitiesService.updateCommunities(this.properties, this.properties.communitiesAPI);
123 129
    if (typeof document !== 'undefined') {
124 130
      try {

Also available in: Unified diff