离子配置变量
Ionic configuration variables
我看了下Ionic的官方文档
http://docs.ionic.io/docs/io-config
首先它不起作用(当我 运行 添加新密钥的命令时它总是以相同的错误完成 "Unauthorized configuration value")然后,文档没有描述如何get/find 我的 angular 控制器中的值(我应该使用 $ionicCoreSettings 吗?)。
如果有一个可以放置我的变量的配置文件对我来说真的很有用,特别是我后端的 url,因为这个在开发期间没有固定的 IP。
关于存储和解析此类变量的任何想法或最佳实践建议?
我使用 angular 常量解决了我的问题。
为了定义常量,我在
中添加了@Linkmichiel 的解决方案
is there a way in Angularjs to define constants with other constants?
并且我在html中添加了常量的使用以及@Nimo在
中使用rootscope的解决方案
Can I directly access module constant from HTML under AngularJS
我看了下Ionic的官方文档
http://docs.ionic.io/docs/io-config
首先它不起作用(当我 运行 添加新密钥的命令时它总是以相同的错误完成 "Unauthorized configuration value")然后,文档没有描述如何get/find 我的 angular 控制器中的值(我应该使用 $ionicCoreSettings 吗?)。
如果有一个可以放置我的变量的配置文件对我来说真的很有用,特别是我后端的 url,因为这个在开发期间没有固定的 IP。
关于存储和解析此类变量的任何想法或最佳实践建议?
我使用 angular 常量解决了我的问题。
为了定义常量,我在
中添加了@Linkmichiel 的解决方案is there a way in Angularjs to define constants with other constants?
并且我在html中添加了常量的使用以及@Nimo在
中使用rootscope的解决方案Can I directly access module constant from HTML under AngularJS