Revision 55963
Added by Argiro Kokogiannaki almost 5 years ago
SEO.service.ts | ||
---|---|---|
11 | 11 |
|
12 | 12 |
createLinkForCanonicalURL(url:string, addParameters:boolean=true) { |
13 | 13 |
if(this.doc && (typeof this.doc.getElementById === "function" || typeof this.doc.createElement === "function") ){ |
14 |
if(addParameters || !this.doc.URL || this.doc.URL.indexOf("?") == -1){ |
|
15 |
url = this.doc.URL; |
|
16 |
}else{ |
|
17 |
url = this.doc.URL.substring(0,this.doc.URL.indexOf("?")); |
|
14 |
if(!addParameters && url && url.indexOf("?") != -1){ |
|
15 |
url = url.substring(0,url.indexOf("?")); |
|
18 | 16 |
} |
19 | 17 |
if (typeof this.doc.getElementById === "function") { |
20 | 18 |
let currentLink: HTMLLinkElement = this.doc.getElementById("relcan"); |
Also available in: Unified diff
[angular7|library]
Merging Trunk into branch 55904:55959