Totally agree
Set mode of alert and toast
Database pull in FTP data that is sent over at an interval
I have a data source that is related to financial markets that updates constantly while the market is open for trade. The software has a function to publish reports via FTP to a FTP server of my choosing at a time interval of my choosing (i.e. every 5 minutes).
I am brand new to ionic but have some coding background from my college days (CS major). Can someone point me in the right direction on a tool to pull that report into a database from which my ionic app will rely on for information.
I will also need to utilize formulas to calculate values from data in that report as well to display within the app.
Thanks,
Justin
Loading custom HTML from a file?
Put the object tag inside the ion-content then you can set variables with your html filenames in your ts file like...
chartOne: string = 'myFile.html';
Keep the html files in the page folder that you're working with.
Then reference that variable in the object tag.
Repsitioning Images within a Card
Hi,
This comes after a whole days effort at fixing this. I have a card list displaying images and text.
There are two types of images
1. where image height > width
2. Image width > height.
I have no problem with the second. But with my first when I try to display the image after resizing it it sticks to the left side. I have pretty much tried every trick I know in css nothing seems to work. Please be advised I am not a expert in CSS.
One promising trick was to use transform: translateX(50pxs). But the problem I face is that I dont know if its 50 px or 100 px because that value will change for each image. Also I have two different kind of images here Landscape and Portrait. I dont want this rule being applied on the Landscape mode.
I also looked at compass for sass to use @if. But could not figure out how to select the different CSS settings based on the images actual width and length.
Can some one suggest how to get the images width and height after resizing and apply CSS rules based on these values.
It needs to be something like this.
img.classname {
@if width>height{
max-height: 200px;
max-width: 100%;
width:auto;
height:auto;
transform: translateX(0px);
}
else
{
max-height: 200px;
max-width: 100%;
width:auto;
height:auto;
transform: translateX((((max-width)-width)/2)-(width/2));
}
Thanks and regards.
SD
Angular fire 4 error injector
Runtime Error
undefined is not a function
Stack
TypeError: undefined is not a function
at _firebaseAppFactory (http://localhost:8100/build/main.js:139685:16)
at _callFactory (http://localhost:8100/build/main.js:11701:17)
at _createProviderInstance$1 (http://localhost:8100/build/main.js:11640:26)
at resolveNgModuleDep (http://localhost:8100/build/main.js:11622:17)
at _callFactory (http://localhost:8100/build/main.js:11697:34)
at _createProviderInstance$1 (http://localhost:8100/build/main.js:11640:26)
at resolveNgModuleDep (http://localhost:8100/build/main.js:11622:17)
at _createClass (http://localhost:8100/build/main.js:11677:32)
at _createProviderInstance$1 (http://localhost:8100/build/main.js:11637:26)
at resolveNgModuleDep (http://localhost:8100/build/main.js:11622:17)
Ionic Framework: ^3.5.0
Ionic App Scripts: 1.3.12
Angular Core: ^4.2.5
Angular Compiler CLI: ^4.2.5
Node: 7.6.0
OS Platform: Linux 4.4
Navigator Platform: Linux x86_64
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Images and data from JSON are not shown on Android tablet in my app
[Ionic V2 - Android]
Hello I'm currently working on my first app, and encountering some problems..
I have a couple of images in my app, which are located both in src/assets/img and www/assets/img and one json file which is located in src/assets/json and www/assets/json (this post here recommended doing that, but it hasn't solved my problem)
The json file is used to display a list of food names and some numbers associated with them, and the images are used as a background image and in recipes. Now, the background images work, but the recipe images and the food list don't, and I'm not sure why..
This is how the background images are used in start.scss:
.start-background-1 {
background: url("../assets/img/level1.png") fixed;
background-size: cover;
background-repeat: no-repeat;
background-position: center;
}
This is how the recipe images are used in recipes.ts:
this.recipes = [
{ id: 0, title: 'Chili sin Carne', imageUrl: '../assets/img/0.jpg',
category: 'einfach', co2: 497, recipeIngredients: this.ingredient_CsC,
method: 'some text'},
//more recipes
]
This is how the json file is used in start.ts:
this.http.get('../assets/JSON/ingredients_exhibition.json')
.map(res => res.json())
.subscribe((data) => {
this.ingredients = data;
console.log(this.ingredients);
window.localStorage.setItem("ingredient_list", JSON.stringify(this.ingredients));
});
Ionic 3 API Parsing Error
Hi,
Ionic fan here, I recently updated my Ionic environment to Ionic 3 for one of my applications. Everything was working till Yesterday. Now I am stuck. I am calling an API using http.get() and showing the response in view file.
story-detail.ts
ionViewWillEnter() {
let d = new Date();
let timezone = d.getTimezoneOffset() / -60;
let param = {
story_id: this.navParams.get('story_id'),
timezone: timezone,
uid: ''
}
let params = this.Obj2Param(param);
this.http.get('https://xxxxxxxxx.com/dev/api/v1/story/info?' + params)
.map(res => res.json())
.subscribe(data => {
console.log(data.data);
this.story = data.data;
});
}
story-detail.html
<ion-content>
<div class="story-cover">
</div>
<section padding>
<div class="section-title">
{{story.story_title}}
</div>
</section>
</ion-content>
It is as easy as it looks but I don't know why its giving me this error:
However, when I check my console, it displays the Object correctly.
Any help would be appreciated, Thanks!
Repsitioning Images within a Card
What are you trying to accomplish? That Name1 looks like Name2?
Ion-segment issues
Finally !!
After creating a dummy project and literally moving each piece of code one-by-one, I finally got the problem...
changeDetectionStrategy with ion-segment has some sort of a bug...
If changeDetection is active on a page, the ion-segment default page selection does not work...if you disable the changeDetection, segment selection starts working.
Loading custom HTML from a file?
Thanks. I'll try it.
How to validate inputs in edit forms?
I have a page and I can add and edit in the same page, but I can't do the validation.
I want to know if I can edit and validate in the same page.
Header aligns title and icon in a weird way
Hey I have a slightly weird visual bug in my header with the way the elements are aligned, and I can't fix it with things like "margin-top: 20px;" in the scss..
It currently looks like this:
<ion-header>
<ion-navbar>
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title class="title">EVE</ion-title>
<ion-icon class="score" name="trophy" (click)="showScore()"></ion-icon>
</ion-navbar>
</ion-header>
.score{
float:right;
margin-right:10px; //added so that it isn't pushed right to the edge
// margin-bottom: 20px; //doesn't work, makes the whole header wider somehow
}
.title{
// margin-top: 20px; //doesn't work, makes the whole header wider somehow
}
Snackbar Component
I think this toast component with button handler still different from real snackbar component.. but its ok, thanks for the information.
Repsitioning Images within a Card
I'm assuming your question is how to align the images in the center...
img.classname {
display: block;
margin-left: auto;
margin-right: auto
}
How to validate inputs in edit forms?
Can you give an example of what you want to do...I'm thinking you are looking for Forms Validation
Header aligns title and icon in a weird way
<ion-header>
<ion-navbar no-border-bottom color="primary">
<button ion-button menuToggle>
<ion-icon name="menu"></ion-icon>
</button>
<ion-title>EVE</ion-title>
<ion-buttons end>
<button ion-button icon-only (click)="showScore()">
<ion-icon name="trophy"></ion-icon>
</button>
</ion-buttons>
</ion-navbar>
</ion-header>
What is the best way to work with push notifications in ionic now?
Hello i tried to work with push notifi in ionic but i can't do it any way can any one tell me how to work with it?
thanx
I can't parse json ajax data
Try this URL
https://jacktools.net/api/echo/echo.php
you shoud get this json:
{"echo":""}
If it works than you have a Server side problem.
Ionic 3 API Parsing Error
I think the issue is that the error is being thrown when the view is being rendered, and the data is arriving after the "view is going to enter"...
To avoid the error try doing this
<div class="section-title">
{{story?.story_title}}
</div>
Header aligns title and icon in a weird way
wow thank you!! that works! should I change anything in the scss file?