瀏覽器測試
當程式源始碼及相關的軟體套件都安裝完成後,可以執行ionic serve指令,讓本機電腦啟動一個網頁伺服器,網址是本機ip,port預設值為8100,如:http://192.168.0.15:8100 ,注意,使用瀏覽器部分功能是無法測試使用的,需要把程式放到實機後才可以正常運作,在這裡主要測試一些客製化版本,顏色修改後,可以直接在瀏覽器顯示結果。
執行指令 ionic serve
ionic serve
allen-mba:mm2 allen$ ionic serve
Running 'serve:before' gulp task before serve
[02:57:31] Starting 'build'...
[02:57:31] Starting 'sass-build'...
[02:57:31] Starting 'lang'...
[02:57:31] Starting 'watch'...
[02:57:38] Finished 'watch' after 7.24 s
[02:57:47] Finished 'sass-build' after 16 s
[02:57:47] Starting 'sass'...
[02:57:48] Finished 'lang' after 16 s
[02:57:51] Finished 'sass' after 4.28 s
[02:57:53] Finished 'build' after 22 s
[02:57:53] Starting 'config'...
[02:57:53] Finished 'config' after 30 ms
[02:57:53] Starting 'default'...
[02:57:53] Finished 'default' after 6.17 μs
[02:57:53] Starting 'serve:before'...
[02:57:53] Finished 'serve:before' after 4 μs
Running live reload server: http://192.168.0.15:35729
Watching: www/**/*.html, www/build/**/*, www/index.html, !www/lib/**/*
√ Running dev server: http://192.168.0.15:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
ionic $
瀏覽器顯示如下圖:
Last updated
Was this helpful?