xampp - 链接到不在根目录中的目录(xampp - linking to directory not in root)
我刚刚安装了xampp,并希望链接到一个单独的(不是c)驱动器上的一些开发网站。 以前在IIS中,我会在默认网站中添加一个虚拟目录。 我该如何做xampp中的等价物。 任何指针赞赏。
I have just installed xampp and would like to link to some dev websites on a separate(not c) drive. Previously in IIS, I would add a virtual directory in the default website. How do I do the equivalent in xampp. Any pointers appreciated.
原文:https://stackoverflow.com/questions/6773422
最满意答案
假设您有以下
angular-translate
翻译定义://de "with_date": "German: {{date|date:'short'}}" //en "with_date": "English: {{date|date:'medium'}}"
然后在视图内部,你可以这样做:
<h1>{{ 'with_date'|translate:{date:today} }}</h1>
today
在控制器中定义的地方即:$scope.today = new Date();
假设您已经使用正确的语言环境加载了
angular-locale_*
,日期将以特定语言/国家/地区的格式进行格式化。这是一个演示 。
说到内置于angular(
ngLocale
)的本地化机制非常有限,当谈到日期时,您可以使用moment.js完成奇迹Assuming you have following
angular-translate
translations definitions://de "with_date": "German: {{date|date:'short'}}" //en "with_date": "English: {{date|date:'medium'}}"
Then inside a view you can do:
<h1>{{ 'with_date'|translate:{date:today} }}</h1>
Where
today
is defined in controller i.e.:$scope.today = new Date();
Assuming you've loaded
angular-locale_*
with correct locale the dates will be formatted in a language/country specific way.Here's a demo.
Having said that localization mechanism built into angular (
ngLocale
) is very limited and when it comes to dates you can accomplish wonders with moment.js
相关问答
更多-
假设您有以下angular-translate翻译定义: //de "with_date": "German: {{date|date:'short'}}" //en "with_date": "English: {{date|date:'medium'}}" 然后在视图内部,你可以这样做:
{{ 'with_date'|translate:{date:today} }}
today在控制器中定义的地方即: $scope.today = new Date(); 假设 ... -
我问图书馆的创建者,他说 是。 请查看http://htmlpreview.github.io/?https://github.com/uhlryk/angular-dynamic-number/blob/master/examples/index.html 在底部有“角动态数字滤波器示例”部分从这一行开始https://github.com/uhlryk/angular-dynamic-number/blob/master/examples/index.html#L159 我想这回答了我的问题 I ask ...
-
angularjs $ translate:在错误处理程序中获取默认翻译(angularjs $translate : get default translation in error handler)[2023-11-27]
我所要做的就是设置fallBackLanguage: $translateProvider.fallbackLanguage('en'); All I had to do was set fallBackLanguage: $translateProvider.fallbackLanguage('en'); -
使用AngularJS过滤器格式化数据 AngularJS提供了一些过滤器: currency , lowercase , uppercase ( http://www.w3schools.com/angular/angular_filters.asp )或者您可以定义自己的过滤器 例: var app = angular.module('myApp', []); app.controller("myCtrl", function($scope) { $scope.data = [{ na ...
-
AngularJS:动态语言环境(AngularJS: Dynamic locale)[2022-04-11]
以防万一您没有必要使用Angular Dynamic语言环境,您可以像这样创建您自己的LocaleFactory: factory('LocaleFactory', function ( $locale, $translate) { var locales = { nl: { "DATETIME_FORMATS": { "AMPMS" : [ "AM", ... -
您不能正确配置translationProvider。 你应该在配置中有这样的东西: $translateProvider.translations({ 'TRANSLATEME': 'Here is the translation' }); 和data.foo需要等于TRANSLATEME 。 这是一个显示它工作的Plunker 。 You must not have the translationProvider configured correctly. You should have so ...
-
您可以在HTML模板中轻松使用日期过滤器 : {{date | date: 'YYYY/MM/DD'}} 将您的控制器代码更改为: var str = data.date; $scope.date = new Date(str); 因此,'date'可以绑定到HTML模板,如上所述。 You can easily use a date filter do that in your HTML Template: {{date | date: 'YYYY/MM/DD'}} Change your cont ...
-
为什么在LINQ表达式中解析字符串? LINQ的整个目标是避免这一点。 var q = from p in this.repository.GetQueryable
() select p; if (startDate.HasValue || endDate.HasValue) { var searchStartDate = startDate.HasValue ? startDate.Value : DateTime.MinValue; var searchEndDate = ... -
角度翻译 - 格式日期(Angular translate - format dates)[2022-11-22]
我终于结束了使用moment.js和Angular时刻 。 可以使用以下格式将日期格式化为语言环境默认值:{{user.lastLogin | amDateFormat:'l LT'}} 要更改时刻区域设置,请使用以下命令: amMoment.changeLocale(language); 不要忘记导入您希望支持的语言的片段语言环境文件: