Setup up wireless connection for ESP8266 from cellphone or computer

Is there a way to steup wireless ssid and password externally? I mean not from the code like the common way

char ssid[] = "myNetwork";          //  your network SSID (name) 
char pass[] = "myPassword";   // your network password
status = WiFi.begin(ssid, pass);

Using code method, ESP8266 can only connect to specific router. But I would like to carry ESP8266 to a new environment and let it connect to the wireless network there.

WiFiManager library in IDE Library Manager