After making a http call, I am getting a JSON object. One of the properties within this object is LinkUrl. Sometimes, LinkUrl will contain a predetermined URL from the returned object, while other times it will only have a file name. In the latter case, I will need to add a base URL to the beginning of the file name.
I'm unsure whether there is a more angular-specific method to handle this scenario or if I should use a regex if statement.
Below, I have included the LinkUrl that only contains the file name. If there is no URL provided, I will need to prepend a URL specifying where the file will be hosted. This will result in the output being displayed in my view.
Any assistance on this matter will be highly appreciated.
0: Object
$$hashKey: "00B"
GroupId: "1"
GroupName: "Store # 11 - OKC"
LanguageName: "English"
LinkTypeAbbr: "Store_Docs"
LinkTypeDescr: "Store Documents"
LinkTypeId: "1"
LinkUrl: "store11_OKC_Docs.pdf"