I am completely new to TypeScript. I have been attempting to locate an element using a selector, but no matter what I tried, the findElement() method always returns undefined. Can someone please point out where my mistake might be? Any assistance would be greatly appreciated!
var cdnBasePath: any = this.findElement('meta[name="cdnBasePath"]').attr('content');
public findElement(selector: any) {
if (angular.isDefined(this.$window.jQuery)) {
return this.$document.find(selector);
} else {
return angular.element(this.$document.querySelector(selector));
}
}