首页 \ 问答 \ 角度常数最佳实践(Angular Constant Best Practice)

角度常数最佳实践(Angular Constant Best Practice)

我有一个角度常量,它定义了webservice端点

angular.module('myModule').constant('mywebservice_url', 'http://192.168.1.100')

问题在于,对于开发我有不同的终点,而分期和生产则不同。 每次我尝试签入git时我都必须手动重置此文件。

  1. 有什么办法git永远忽略这个文件,但在clonecheckout文件?
  2. 有什么方法可以从环境变量等动态制作角度拾取文件。

注意:我不想依赖服务器来执行此操作,即我不想使用apach SSI或任何这些技术,因为它只能使用一组服务器。


I have an angular constant which defines webservice end point

angular.module('myModule').constant('mywebservice_url', 'http://192.168.1.100')

The problem is that for dev I have a different end point while staging and production its different. Every time I try to check in to git I have to manually reset this file.

  1. Is there any way git permenantly ignore this file but checks out the file while clone or checkout?
  2. Is there any way I can make angular pickup file dynamically from something like environment variable.

NOTE: I don't want to depend on server to do this, ie I don't want to use apach SSI or any of those technologies as it will work only one set of servers.


原文:https://stackoverflow.com/questions/30159867
更新时间:2022-09-21 18:09

最满意答案

media='none'media='abc'

它发现'abc'(或任何字符串)为[mymedia]的原因

你应该使用

<display:column property="index" title="" class="hidden" headerClass="hidden" /> 

在你的CSS文件中。

.hidden {
 display: none;
}

media='none' is same as media='abc'.

Reason it finds 'abc' (or any string) as [mymedia]

You should Use

<display:column property="index" title="" class="hidden" headerClass="hidden" /> 

And in your CSS file.

.hidden {
 display: none;
}

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。