问题标签 [ionic-v1]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
angularjs - Ionic/AngularJS checkbox and ng-repeat from API
The idea was to send true checkbox values from mobile to API so I can place an order with selected condiments, however I cant to get a grasp on it. Condiments are returned from HTTP GET call to API.
It calls the function:
(minus 1 is because ID starts at 1, and array at 0) But it is not called when checked/unchecked, but rather it makes all my resources checked by default, and once I click to uncheck them, nothing changes.
Property 'checked' is not part of the original JSON API output for the condiment. It has ID, name and price.
Question:
Is there a less painful way to send checked ID's back to server?
Edit:
I tried to set the default variables before, but that does nothing:
angularjs - 如何根据下拉菜单项更改变量属性?
我有一个填充了 ng-options 的下拉菜单。
如何让值 c.code 成为名为 selectedCurrency 的变量的属性?
angularjs - Error status codes are not being caught
I am trying to catch angular resource's HTTP error status code (!=200). My Service, where I have resources defined: (apiService.js)
My controller's code:
When I send the request and I receive response code 400/503, I believe that function(error) code should be executed but it's not.
Instead, my code in $promise.then(function(result)(...)
is executed and I am not able to detect a response HTTP status code.
So, my questions:
- Why isn't my error handling function being executed?
- How can I detect HTTP response status codes?
angularjs - 如何在 IONIC 的动态选择选项中设置预选数据
我面临一个奇怪的问题,我需要在选择选项中显示预先选择的数据(也来自服务器)。我需要根据键和值选项显示选择选项的问题。
JSON数据
我不知道如何在选择选项中显示预先选择的数据,我尝试了很多,但直到现在我还没有成功。请帮忙。
javascript - 使外部异步 JavaScript API 适应 AngularJS 框架
我一直在尝试调整 API 的 JavaScript 代码以接收支付令牌,但我找不到创建运行代码的函数的方法。API 的原始示例效果很好,但我无法将代码转换为可重用的函数。我尝试了不同的方法,但总是遇到同样的错误:
我在 Ionic 应用程序中使用此代码。请帮助我,我找不到解决方案。
API的原始示例:
我的代码:
angularjs - 如何在离子弹出窗口中使用 If 条件
我创建了一个常见的弹出屏幕,它在三个模块中使用,但三个模块有不同的标题。我没有在标题中给出条件,是否可能有人给我解决方案。
此处弹出代码:
angularjs - 在 ng-repeat 中更改 angularJS 中的类
我有两个 CSS 分类triangle
和triangleo
所以如果 chatdata.usrId == 123 类应该是triangle
elsetriangleo
android - 如何在 android studio 中测试离子应用程序 1?
我已经苦苦挣扎了两天,没有一个清晰的教程可以解释使用 android studio 测试离子应用程序。我已经在 ionic 1 中制作了完整的应用程序,并且我还配置了 android studio。现在下一步是什么?
javascript - 白屏出现在ionic1中的屏幕旋转上
我有一个屏幕,当我改变方向时我已经给出了方向屏幕需要一些时间来改变方向同时我得到白屏谁能告诉我为什么会发生即使我尝试使用
正在运行,但我仍然遇到同样的问题。
方向改变代码:
html: