我已经在yeoman创建了一个离子项目。当ionic serve命令显示多个地址时,我选择了localhost选项。但是,当我运行的应用程序的显示错误控制台如何解决“参考错误:离子未定义”当我运行命令离子服务--lab
ReferenceError : ionic is not defined
上,并且这是我下面的完整过程 -
Running live reload server: http://localhost:35729
Watching : [ 'www/**/*', '!www/lib/**/*' ]
Running dev server: http://localhost: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 $ c
Console log output: enabled
Loading: /?restart=998712
ionic $ 0 129599 error ReferenceError: ionic is not defined, http://localhost:8100/?ionicplatform=ios, Line: 103
0 129653 error ReferenceError: ionic is not defined, http://localhost:8100/?ionicplatform=android, Line: 103
我无法理解,为什么这个错误是在闪烁安慰。 Ionic安装在我的系统离子上,我已经使用离子命令测试了它。这是我得到的错误的截图。我还检查了ionic.config文件系统和它的服务器地址已经存在以下方式
"ionicServeAddress": "localhost"
请帮我解决这个问题。
你有在你的ionic.project文件中定义的gulp任务吗? – cfprabhu
任何解决方案呢? –