Welcome! As it’s your first post here, perhaps you’re not familiar with my general disdain for the entire world of JavaScript, but here’s one more thing to hate: there are lots of libraries that expect to be running under Node.js, and don’t deal real well with life in a browser. You appear to have stumbled upon one of these. I would look for a replacement that advertises browser support: perhaps this one?
Using Zlib
Backing up ionic project
I like gitlab over github, but still, some sort of version control is absolutely the best way to go here.
Security in Ionic apps is interesting, in that the entire process of distributing your app binary effectively publishes the app source. Leaving copyright concerns out of it, I take the position that I should be able to store everything needed to build the app absolutely anywhere. If there is need to hide secrets that are baked into an Ionic app, that represents a major design problem. All secrets and security need to be delegated to servers under your control that live outside the place the Ionic app is running.
How to build this interface with ionic is it possible? or do I need react js or native android?
I think Ionic can do this. You will have a complex design, but any solution is going to have the same level of effort. The trick will be getting the layout grid in place.
Good luck and let us know how it goes.
Use Script to connect with web api after build
It can be stored on device using Ionic Storage and retrieved at every app startup time. I would consider this just a special case of the general question “how do I persist user preferences?”.
Using Zlib
I’m already working with Pako library, thank you for the tip @rapropos.
Somewhere I did see that javascript was the “hatest and lovest” programming language, I’m starting to understand why.
In reference to zlib it self, why are you so sure that the LIB doens’t work with browser? I’ll like to do not invest a whole day next time I can’t make work a nodejs library in the browser.
Production Build JavaScript Subdirectort
Ionic generates numerous JavaScript files in the www directory when I create a production build. Is there any easy way to put the JavaScript files in a www subdirectory and change all required references to these files? This would make it a lot cleaner when a deploy an app as a PWA and not bloat the top-level directory.
If there is no easy way, an additional option when running “ionic build --prod” would be useful.
Using Zlib
Ironically, pretty much the only thing I like about it - the fact that it’s easy to implement interpreters for it - is largely the reason I have to deal with the giant mountain of things I hate about it, because it’s so universal.
I guess it’s not really zlib itself, but that implementation you’re working with. My mental checklist for “might this be a node/browser concern?” goes something like this:
- are we dealing with a “headless” library, that is primarily concerned with munging data about, instead of doing something visual? if so, raise probability
- are we seeing uncaught exceptions that spawn completely within the library, with no app code involved whatsoever (yes, in your case)? if so, raise probability
- do they involve undefined identifiers, especially some of the usual suspects in these cases like
buffer
,fs
orcrypto
? if so, raise probability - look at the project’s documentation and bug list - is it supposed to work in the browser? if so, lower probability.
- are people using it a browser environment? if so, lower probability
- are people trying to use it in a browser environment, failing, and filing bugs? if so, raise probability greatly
- did OP try running this library under node and had no problems? (OK, this has never happened before, but you did do it, which was a HUGE help to me) if so, raise probability through the roof
Production Build JavaScript Subdirectort
Perhaps you will find information useful to your quest in here.
Using Zlib
Understood!!
Very clear and helpful to me
Very Basic quesiton, Creating custom component
Hello, im new to inoic as well as react and java script. I have a lot of knowledge of other languages such as java python and c#. I have a question that is probebly really stupid and simple to answer but im finding it hard to get my head around. I will add my code below. I have a if statements and i want both results use the component however if i do not add a blank one then ionic says that there is no as its needed for tabs. How do i essentially create a class that contains as well as another infomaton and then just beable to use this component instead of having to copy and paste. I hope my code makes it easyer to understrand what im trying to do and i think its proably more of a react or javascript question but thought i would ask here as i might be wrong thank you!
const RoutingComp: React.FC= () => {
return(
//This is what im talkinga bout below -----------------
<IonRouterOutlet>
<Route path="/dashboard" component={Dashboard} exact={true}/>
<Route path="/home" component={Home} exact={true} />
<Route path="/page2" component={Page2} exact={true} />
<Route path="/login" component={Login} exact={true} />
<Route path="/register" component={Register} exact={true} />
<Route exact path="/" render={() => <Redirect to="/login" />} />
</IonRouterOutlet>
)
}
const RoutingSystem: React.FC = () => {
return(
<IonReactRouter>#
{true ?
<IonTabs>
--Have to create a "fake" IonRouterOutlet as it does not recognise routingcomp as a IonRouterOutlet
<IonRouterOutlet>
<RoutingComp/>
</IonRouterOutlet>
<IonTabBar slot="bottom" >
<IonTabButton tab="home" href="/home">
<IonLabel>Liked Properties</IonLabel>
</IonTabButton>
<IonTabButton tab="dashboard" href="/dashboard">
<IonLabel>Find Properties</IonLabel>
</IonTabButton>
<IonTabButton tab="page2" href="/page2">
<IonLabel>Profile</IonLabel>
</IonTabButton>
</IonTabBar>
</IonTabs> :
<IonRouterOutlet>
<RoutingComp/>
</IonRouterOutlet>
}
</IonReactRouter>
)
}
Using ModalController inside a service
I have 2 pages : MainPage and ModalPage.
ModalPage will be a modal
Basically it’s working.
a) MainPageModule imports ModalPageModule,
b) MainPage imports MainPage
c) async open_modal is the function that use modalCtrl with ModalPage as component
But now i would like to use a service which manage ModalController.
ModalService import ModalPage and Dependecy Injection of ModalController
Angular say
!! Error: No component factory found for ModalPage.
!! Did you add it to @NgModule.entryComponents?
I try
- add ModalPage inside declarations and entryComponents arrays of MainPageModule
- add ModalPage inside declarations and entryComponents arrays of ModalPageModule
No way
googling to use modalCtrl inside a service:
https://www.damirscorner.com/blog/posts/20191011-OpeningIonic4ModalsFromACommonService.html
I try this because MainPage use ngrx, and have to manage a lot of state (workflow), i would try to organize it by splitting code into différents services.
Hope somebody could say me where i have to declare ModalPage when i want to use a service that manage ModalController.
Best regards
Ion-select con imagenes en cada ion-select-option
Como puedo agregar una imagen en cada elemento del ion-select
Necesito mostrar monedas con la bandera respectiva, he tratado de agregar una clase con renderer pero no me sale
Using ModalController inside a service
There’s a subtlety here that I need to clarify before I can say anything further. Pick which statement below accurately describes your situation:
A. I want to make a service that manages all modals in my app, of which ModalPage
is but one
B. I want to make a service that can be used to transform some data, and one of the ways it can potentially do that is by can do that is by getting some user input using ModalPage
If neither of these makes you say internally “YES - that’s exactly what I want”, then that’s an OK answer as well, but it would help to know more about why.
CUSTOM SLIDER ionic 4
Hello everyone,
we was using this tutorial for our sliders with ionic 3
: https://www.damirscorner.com/blog/posts/20171006-HiddenAdvancedFeaturesOfIonicsSlides.html
for this result:
However, we have problems implementing it with ionic 4.
Anyone have a solution to get the same result?
thank you
Using ModalController inside a service
Here is an example of calling a modal from a service https://github.com/NikolaPeevski/ionic-modal-service
Interactive Debug with VSCode and Android Emulator
I’ve seen some posts asking this, but no answers.
I’d like to interactively debug with VS Code (and Capacitor) when running my Ionic app in an Android emulator. Is this possible? If so, can you direct me to a white paper/video showing how to wire this up?
Breakpoints, for example, that fire in VS Code from an emulator is what I am after…
Application error. The connection to the server was unsuccessful
Saved my day!! Thanks Mate
How to place a ionic tab in the middle of the screen in ionic4
Is it possible to place ion-tab at the middle of the screen.I have an image with some text on the top of the page.Is it possible to place ion-tabs at the middle of the screen that is beneath the image and content.
Schedule 6<ion-tab-button tab="speakers">
<ion-icon name="contacts"></ion-icon>
<ion-label>Speakers</ion-label>
</ion-tab-button>
<ion-tab-button tab="map">
<ion-icon name="map"></ion-icon>
<ion-label>Map</ion-label>
</ion-tab-button>
<ion-tab-button tab="about">
<ion-icon name="information-circle"></ion-icon>
<ion-label>About</ion-label>
</ion-tab-button>
```
How to place a ionic tab in the middle of the screen in ionic4
What kind of view you want, share a demo image.
You can use ion-fab to put button in middle