这似乎是一个简单的问题.我在Ionic 2应用程序中使用管道作为日期格式.这是收到的webservice响应.
[
{
"MessageID": 544882,
"CategoryID": 1,
"DateSent": "2015-05-18T02:30:56",
"Title": "Jobseeker App",
"MessageContent": "Hi Test guy just started to use the app..",
"Sender": null,
"Recipient": null,
"DateReceived": null,
"DateRead": "2015-05-18T02:30:56",
"Note_Direction": "sent",
"Viewed": 0,
"AppointmentDateTime": null,
"MessageAttachments": [
]
},
{
"MessageID": 544886,
"CategoryID": 1,
"DateSent": "2015-05-18T02:42:45",
"Title": "Jobseeker App",
"MessageContent": "App",
"Sender": null,
"Recipient": null,
"DateReceived": null,
"DateRead": "2015-05-18T02:42:45",
"Note_Direction": "sent",
"Viewed": 0,
"AppointmentDateTime": null,
"MessageAttachments": [
]}
]
Run Code Online (Sandbox Code Playgroud)
这是我正在使用的代码片段.
<div class="Date">
<label class="time">{{appointment.DateSent | date:"HH"}}:{{appointment.DateSent| date:"mm"}}</label>
<label …Run Code Online (Sandbox Code Playgroud) 当我拥有Xcode 9并将代码从应用程序文件夹中删除(由于使用其他Apple ID安装的代码无法更新)并从Appstore重新安装Xcode 10时,我的代码运行正常(正确显示UI)。
现在Xcode故事板不显示任何添加的UI元素颜色或其他任何东西,我删除了Xcode 10并再次安装了Xcode 9,但问题仍然相同。
故事板的UI屏幕截图。
我尝试以这种方式删除Xcode:
/Applications/Xcode.app
/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Preferences/com.apple.dt.Xcode.plist
~/Library/Caches/com.apple.dt.Xcode
~/Library/Application Support/Xcode
~/Library/Developer/Xcode
~/Library/Developer/CoreSimulator
Run Code Online (Sandbox Code Playgroud)
然后,我尝试安装macOs Mojave并再次从Appstore安装XCode 10。问题仍然存在。我尝试清理派生数据,xuserdata和所有内容。
我正在开发Ionic 2中的应用程序.我需要以动态的方式添加离子选择选项,但我对可能非常简单的事情感到难过.这是我的代码片段.
<ion-select [(ngModel)]="classifications" (ngModelChange)="updateSelectedValue($event)">
<ion-option *ngFor="#key of classifications" value="key" [checked]="true">{{key}}</ion-option>
Run Code Online (Sandbox Code Playgroud)
this.classifications = this.local.get('classifications')._result;
console.log('classifications: '+ this.local.get('classifications')._result);
updateSelectedValue(event:string):void {
this.selectedObject = JSON.parse(event);
console.log('selectedObject: '+this.selectedObject);
}
Run Code Online (Sandbox Code Playgroud)
控制台日志的输出:
classifications: ["Any","Agriculture, Forestry, And Fishing","Mining","Construction","Manufacturing","Transportation, Communications, Electric, Gas, And Sanitary Services","Wholesale Trade","Retail Trade","Finance, Insurance, And Real Estate","Services","Public Administration "]
Run Code Online (Sandbox Code Playgroud)
我也得到了例外.
EXCEPTION: Cannot find a differ supporting object '["Any","Agriculture, Forestry, And Fishing","Mining","Construction","Manufacturing","Transportation, Communications, Electric, Gas, And Sanitary Services","Wholesale Trade","Retail Trade","Finance, Insurance, And Real Estate","Services","Public Administration "]' in [classifications in JobsearchPage@30:17]
Run Code Online (Sandbox Code Playgroud)
编辑:
它没有设定其选择的价值.我在Angular 1中做过这个.
<select id="classificationId" …Run Code Online (Sandbox Code Playgroud) 我有一个Ionic 2应用程序,它在Chrome浏览器中工作正常,但是当它在模拟器(使用Safari进行远程调试)或实际设备上运行时,它会产生以下错误.此错误后应用程序无法完全正常工作.
V2%20AppName.app/www/build/js/es6-shim.map. Failed to load resource: The requested URL was not found on this server
Run Code Online (Sandbox Code Playgroud)
这是我的index.html.我有另一个错误,说明如上所述的ngCordova.我想我ngCordova没有正确地走它的道路.有没有办法测试它的安装是否正常.
<!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Ionic</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--<meta http-equiv="Content-Security-Policy" content="img-src 'self' data:; default-src 'self' http://XX.XX.XX.XX:8084/mypp/">-->
<!--<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">-->
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">
<link rel="stylesheet" href="build/css/font-awesome.min.css">
<link ios-href="build/css/app.ios.css" rel="stylesheet">
<link md-href="build/css/app.md.css" rel="stylesheet">
<script src="lib/ngCordova/dist/ng-cordova.js"></script>
</head>
<body>
<ion-app></ion-app>
<script src="cordova.js"></script>
<script src="build/js/app.bundle.js"></script> …Run Code Online (Sandbox Code Playgroud) 我的Angular应用程序是使用这个yeoman发生器的样板开发的.
路由和所有工作正常但我无法在navbar-controller.js和footer-controller.js上工作$ scope.请告诉我您是否需要更多信息来提供相关信息.
的index.html
<!DOCTYPE html>
<html lang='en' data-ng-app='app'>
<head>
<title>App</title>
<meta name='viewport' content='width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes'>
<!-- inject:head:js -->
<!-- endinject -->
<!-- inject:html -->
<!-- endinject -->
<!-- bower:css -->
<!-- endbower -->
<!-- inject:css -->
<!-- endinject -->
</head>
<body class="wrapper">
<div ng-controller="NavbarCtrl" ng-include="'navbar/navbar.tpl.html'"></div>
<!-- boxed-layout -->
<div class='container'>
<!--=== Main Content ===-->
<div data-ui-view></div>
<!--=== End Main Content ===-->
</div>
<!-- <div id="footer"
ng-controller="FooterCtrl" ng-include="'footer/footer.tpl.html'">
</div> -->
<!-- bower:js -->
<!-- endbower -->
<!-- …Run Code Online (Sandbox Code Playgroud) javascript twitter-bootstrap angularjs angularjs-scope angularjs-routing
我有下面的代码,到目前为止工作,但有一个小问题,我无法弄明白.用户选择一个选项后,它不会更新(将所选值设置为离子选择)离子选择?基本上UI没有使用选定的值进行更新?
<ion-item>
<ion-label>Classifications</ion-label>
<ion-select [(ngModel)]="selectedItem" #item (change)="onChange(selectedItem)">
<ion-option *ngFor="#item of items" [value]="item">{{item}}</ion-option>
</ion-select>
</ion-item>
onChange(selectedItem) {
console.log('Selected item: '+selectedItem);
}
Run Code Online (Sandbox Code Playgroud)
出来用户选择正确显示,我在这里缺少什么想法?
更新
<ion-item>
<ion-label>Gender</ion-label>
<ion-select [(ngModel)]="gender">
<ion-option value="f" checked="true">Female</ion-option>
<ion-option value="m">Male</ion-option>
</ion-select>
</ion-item>
Run Code Online (Sandbox Code Playgroud) 我需要自定义G +登录按钮(我需要应用图像),还有自定义吗?文档说,如果我们使用多个社交媒体集成,它可以自定义.
https://developers.google.com/+/branding-guidelines#plusone-button
先感谢您!
ionic2 ×4
angular ×3
javascript ×2
angularjs ×1
date-format ×1
google-plus ×1
ios ×1
ngcordova ×1
objective-c ×1
plugins ×1
typescript ×1
xcode ×1
xcode10 ×1
xcode9 ×1