I have referenced sp.js in html page in my sp hosted add-in, in order to use client object model in javascript. But it's giving me an error on _spPageContextInfo while it's referencing the sp.js, why sp.js is referencing _spPageContextInfo?
In the chrome error message it says:
Uncaught Sys.InvalidOperationException: Sys.InvalidOperationException: Cannot find current web URL information on the page.
Here's a screenshot of the error:
Error message taken from sp.js, and it gives an error when referencing new SP.ClientContext()