我正在研究一个贷款计算器,我使用离子范围滑块来选择贷款金额、利率、贷款期限等。还有一个每月支付范围。当贷款金额、利率和期限发生变化时,这个月还款范围应该像这样计算。
(loanamount*interest rate)/loan duration
Run Code Online (Sandbox Code Playgroud)
因此,当我们更改贷款金额、利率和贷款期限时,基本上每月还款范围应该会发生变化。我怎样才能做到这一点?
到目前为止我的代码:
<content has-header="true">
<div class="item item-divider">
Select your Loan Amount :
</div>
<div class="item range">
<div id='slider'>
<input type="range" name="number" min="100" max="1000000" step="100.00" ng-model="loanAmount">
<font color="#009ACD"><b>Loan Amount:</b></font> <input type="text" ng-model="loanAmount" min="100" max="1000000" />
</div>
</div>
<div class="item item-divider">
Select your Interest Rate:
</div>
<div class="item range">
<div id='slider'>
<input type="range" name="volume" min="0" max="100" step="0.01" ng-model="interestRate">
<font color="#009ACD"><b>Interest Rate:</b></font> <input type="text" ng-model="interestRate" min="0" max="100" />
</div>
</div>
<div class="item item-divider">
Select your Loan Term :
</div> …Run Code Online (Sandbox Code Playgroud) 在我的 Ionic 项目中,我想为 Vimeo 视频添加 iframe。当我在我的本地主机和我的服务器上测试应用程序时,这工作正常,但在 Android 上它似乎不起作用。它说由于以下错误,网页无法加载:'net::ERR_FILE_NOT_FOUND'。
这是 iframe 代码:
<iframe src="//player.vimeo.com/video/VIDEO-ID-HERE" width="WIDTH" height="HEIGHT" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>
Run Code Online (Sandbox Code Playgroud)
我已经添加了白名单插件,它可以很好地处理对其他站点的 Ajax 请求,但是 iframe 似乎仍然不起作用。有什么建议?
我正在使用 Ionic 构建一个 Android 应用程序,但我发现了一个我无法解决或无法找到答案的问题。当我运行ionic build android或ionic emulate android我得到以下信息时:
错误:无法找到“ANDROID_HOME”...
我相信我已经在系统变量下的 PATH 和 ANDROID_HOME 中添加了正确的变量,但请检查:http : //imgur.com/a/UOdCd
第一张图片是ANDROID_HOME,第二张显示sdk所在的位置,第三张是错误本身,第四张是我的路径变量。
我从 Git Bash 运行它。以管理员身份运行没有任何区别,我还尝试在不同的文件夹(之前位于 %HOME%\AppData\Local\Android\)中重新安装 Android SDK(使用 Android Studio),但没有任何区别。也尝试在重新安装 SDK 后重新启动。
我还尝试先运行 SDK Manager (C:\Android\sdk\tools\android.bat) 并在尝试构建或模拟时保持打开状态,但它仍然无法正常工作。
build emulation environment-variables android-sdk-2.3 ionic-framework
我在该项目上使用Laravel Echo Ionic。在移动设备上运行它时,我收到ERR_CLEARTEXT_NOT_PERMITTED错误,但在Webview和模拟器上运行良好。
我试图添加
<uses-permission android:name=“android.permission.INTERNET” />
<uses-permission android:name=“android.permission.ACCESS_NETWORK_STATE” />
<uses-permission android:name=“android.permission.ACCESS_WIFI_STATE” />
Run Code Online (Sandbox Code Playgroud)
在,AndroidManifest.xml但是,它不起作用。
我试图添加
<access origin=“*”/>
<allow-intent href=“*” />
<allow-navigation href=“*” />
Run Code Online (Sandbox Code Playgroud)
在config.xml上。
最后我尝试用修改config.xml
<edit-config file=“app/src/main/AndroidManifest.xml” mode=“merge” target=“/manifest/application”>
<application android:usesCleartextTraffic=“true” />
</edit-config>
Run Code Online (Sandbox Code Playgroud)
但一切都不适合我。
任何想法如何解决此问题?
我正在使用Ionic-framework开发一个新应用,并且正在使用HttpClient模块来处理API请求。
问题是我已阅读并尝试将解决方案应用于:
但是我的应用程序在对API进行查询时始终抛出此错误。
这是我的文件的详细信息:
在/时,config.xml中:
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.example" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
...
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
<application android:networkSecurityConfig="@xml/network_security_config"/>
<application android:usesCleartextTraffic="true" />
</edit-config>
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
...
</widget>
Run Code Online (Sandbox Code Playgroud)
在/ resources / android / xml /中,network_security_config.xml:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">localhost</domain>
</domain-config>
</network-security-config>
Run Code Online (Sandbox Code Playgroud)
使用安全加密的协议HTTPS是无效的。该API仅允许使用HTTP。
我正在使用ngFor滑动项目。但是我需要证明那些只有事件价值即将到来的项目。
我只需要显示具有事件值活动状态的数组即可。谢谢
<ion-slide class="slide" *ngFor="let y of upcoming" (click)='details(y)'>
<ion-card class="box" style="background-color: white">
<img [src]="y.picture1" class="image"/>
<div class="row">
<div class="column1" style="background-color: white">
<h3> {{y.days}} Days</h3>
</div>
<div class="column2" style="background-color: white">
<div class="tourdescription">{{y.title}}</div>
<div class="tourdate">{{y.date}}</div>
</div>
</div>
</ion-card>
</ion-slide>
Run Code Online (Sandbox Code Playgroud)
.ts
getUpcoming(){
this.authService.getUpcoming().pipe(
map(actions => actions.map(a => {
const data = a.payload.doc.data();
const id = a.payload.doc.id;
return { id, ...data };
}))
).subscribe(resp=>{
console.log(resp);
this.upcoming = resp;
});
}
Run Code Online (Sandbox Code Playgroud)
我创建了一个应用程序,该应用程序使用Ionic Native HTTP成功连接到我们的服务器,并使用Samsung Galaxy J7 Prime OS版本的棉花糖和尚不在Android Pie下的其他几个软件对其进行了测试。出于某种原因,当我在Android Pie下的设备上对其进行测试时,它将无法再使用,并且我收到了CORS政策问题。有人遇到过类似的问题吗?有没有解决方法?不幸的是,不能在服务器配置中进行修改。我还阅读了一些有关代理的解决方案,但不确定如何实现它们。
版本:cordova-plugin-advanced-http:2.1.1 ionic-native / http:5.8.0
问我如何创建“手风琴列表”。
我需要使用“关于我们”,“服务”示例的几部分内容,单击此按钮后,我将显示信息。
我希望你能帮助我。在离子4中
I'm adding google map on an ionic app using google maps javascript api 3. The map works fine but the minute i add marker on the map, the cordova animations stop working on ios, on android everything works smoothly. For example clicking on ion-select or adding Alert produces following error
Unhandled Promise rejection: – "undefined is not a function (near '...element.animate...')" – "; Zone:" – "" – "; Task:" – "Promise.then" – "; Value:" (2) TypeError: undefined is not a …
I'm working on Ionic v4 with Angular.
In my project i use the BLE to communicate with a raspberry.
I have several step :
Currently i have something like :
this.ble.scan().subscribe(result => {
if (device === theDeviceIWant) {
this.ble.connect(device.id).subscribe(result => {
this.ble.startNotification(infosaboutDevice).subscribe(result => {
// Message 1
this.ble.writeWithoutResponse(infos, message).then(result => {
// Message 2
this.ble.writeWithoutResponse(infos, message).then(result => {
// Message 3
this.ble.writeWithoutResponse(infos, message).then(result => {
// Message X …Run Code Online (Sandbox Code Playgroud) ionic-framework ×10
android ×4
angular ×4
cordova ×3
ionic4 ×3
html ×2
angularjs ×1
animation ×1
async-await ×1
build ×1
emulation ×1
es6-promise ×1
iframe ×1
ios ×1
javascript ×1
list ×1
mobile ×1