Comments (5)
Hey @Martinspire , thanks for the feedback! Just have a question:
On this I like the rest of the code and how it explains various features, but I had hoped it would show me a bit more. Now, of course, the whole system is already weird because you need an API (which never is documented what in this example should be supported or even a basic mock will do).
Are you looking for recommendations on what real backend solution you should use? Currently, the API provider is basically a mock of what interacting with a backend would look like, but it does not mention any actual backend providers you could use.
from starters.
@jgw96 The problem is that I'm not looking to mock backend, I'm looking to use data in my app itself.
Basically where you store data that you already retrieved but want to use multiple times in various locations of your app. I've found in the meantime you can use Providers for this, just make sure you are only import them in the app.module.ts file once and grab their instance by injecting it via the constructor
public myData;
constructor(public someDataProvider: SomeDataProvider) {
// some logic
}
someFunction(){
this.myData = someDataProvider.getMyData();
}
And then keep using that someDataProvider
to store your data.
For this Super Template example, I would suggest after getting the User, to store this in a UserProvider and set some "haveLoggedIn" value. And another for skipping the login (which allows you to skip the welcome but not the login page). And if both are set, it should go to home page.
I'm fine with how the backend is working, but I would like it if there was some more going on with the result and the way a normal user interacts with a new user experience.
Also perhaps it might be wise to accept any user input to the backend and instead of doing some error handling, continue to the home page. Because now it doesn't really look like a demo unless you have a backend (because you cannot login). Providing some extra help to show that we're ignoring the API result, would make that clear enough.
Right now the current example doesn't really do well as a "fully featured" example. It requires too much work to get it going to get an idea of what can be achieved. For me it gave the impression that it was going to be a nice demo, but running into problems soon put an end to that. Now fixing them was not hard, but it should not be required to have a backend for a demo, even though it is pretty basic backend.
Alternatively, something I've done in the past, let it ask a simple JSON file that acts as the backend. It doesn't matter if it goes to localhost:8100/assets/login/response.json
and accepts that as your "backend". It would still have it work like it should without having to use a local server
from starters.
I would like to add a point here, If this template uses Ionic native HTTP client & WKWebView then it will be too good as we are in a phase to migrate every application to have these.
from starters.
Is this starter working for iv4?
I get this ...
$ ionic start superApp super
✔ Preparing directory ./superApp - done!
⠋ Looking up starter
[ERROR] Unable to find starter template for super
If this is not a typo, please make sure it is a valid starter template within the starters repo:
https://github.com/ionic-team/starters
from starters.
Closing this as part of a repo clean up.
from starters.
Related Issues (20)
- Vue starter should use vite instead of vue cli HOT 1
- upgrade ts-node version to a more recent or the latest version
- Sidemenu starter fails with typescript error HOT 1
- Feature Request: Tag Major Versions of Ionic Framework HOT 1
- Feature Request: Publish Changelogs
- bug: typescript compiler options "target" and "useDefineForClassFields" are forcibly overriden with Angular 15 HOT 3
- Bug: vertical centering buggy in tabs template HOT 1
- Angular starters are inconsistent with tests and `beforeEach()` strategy
- test
- bug(react): .gitignore correct production folder
- CommonModule missing in angular-standalone blank starter HOT 1
- bug: starter template not running HOT 6
- bug: keyboard accessibiilty. Cannot reach bottom tabs. HOT 3
- bug: SyntaxError: The requested module 'vue' does not provide an export named 'computed' HOT 2
- Upgrade vue starter to vue@^3.3.0 HOT 2
- bug: error during build: terser not found. Since Vite v3, terser has become an optional dependency. You need to install it.
- Vue: `npm run lint` is not actually linting anything HOT 1
- bug: Angular Tab based application shows empty screen between hiding the Splash Screen and Displaying the Tabs. HOT 4
- test
- Peer dependency errors when starting a new project with Angular
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from starters.