Full app for commnunication within restricted access.
Repository has a default env config src/environments/environment.ts
, you should create an own to your target env, for example for prod src/environments/environment.prod.ts
and run:
$ ionic build --env=prod
// "Using PROD environment variables for DEV build." ("DEV build" is defined by Ionic and means not optimized for production).
$ npm ionic:build --prod --env=prod
// "Using PROD environment variables for PROD build."
- Shared module
- Lazy loading / Deep-linking
- Unit and e2e tests
- Continuous integration
- [] Welcome page
- if first session, use ion-slides
- [] Send Push notification from App
- if user.admin post message on live with #alert
- [] PWA on Desktop
- [] Send Email Newsletter
- use OneSignal for Email
- easy-to-use email building interface
- Use the same powerful segmentation tools in OneSignal for both email and push to better target your audience
- use OneSignal for Email
- Swipeable-tabs
- [] Live feed
- Image gallery
- Devdactic: Image Gallery With Zoom
- Pinch/Zoom image
- [] PWA
- Show toast when new version available
- Add to homescreen
- Offline support
- Optimising the performance of an Ionic PWA - Part 1
- Handle dates and time with ngx-moment
- [] Push notification w/ OneSignal
- OneSignal: Ionic SDK Setup
- OneSignal: Web Push: Typical setup
- Settings page: toggle push notification
- User targeting by tags filtering
- Email messages
- [] REST API integration
- Generate data provider and mockup
- Multi-language
- Responsive Grid Layout
- Master/Detail pattern
- Google Analytics integration
- Pull to refresh
- Skeleton screens
- [] Chat
- [] Mention users in comment
- [] Package app infobox w/ Ionic Pro
- Live Updates
- Firebase hosting for PWA
- Custom SplashScreen and Icon
- Optimize image handling
- Cache images for offline use
- Lazy load images
- load images only when they appear in the browser’s viewport
- Use thumbs
- Theming App
- CRUD with Firestore
- AngularFire, the library built between Firebase and Angular that acts as a wrapper of the Firebase SDK giving you real-time bindings and all the
rxjs
magic - Jave Bratt: Building a CRUD Ionic application with Firestore
- AngularFire, the library built between Firebase and Angular that acts as a wrapper of the Firebase SDK giving you real-time bindings and all the
- [] User authentication and restricted access
- Forms and validations
- Animations
Are PWAs really taking off? With all these native-like capabilities, PWAs are here to stay! Here are some reasons why now is the best time to learn them:
- We already have Chrome PWA support, meaning over 50% of browser share, mobile included
- Apple has agreed to implement Service Workers in Safari
- Microsoft is working on allowing the installation of a PWA directly to a Windows 10 desktop and to run each PWA in a native window
Ionic 3 applications included a service worker by default, [sw-toolbox](https://github.com/GoogleChromeLabs/sw-toolbox, that you could simply uncomment to activate. But this project is deprecated and replaced by workbox. Google provides documentation to migrate from sw-toolbox to workbox.
Since Angular 5 the support for building Progressive Web Applications (PWA) with Service Workers has been build into the framework. Angular provides a package and command line tooling that makes it extremely easy to add PWA support to your Ionic/Angular applications with service workers.
we always serve the latest cached version (to show it almost immediately). At the same time, service worker checks if there is a newer version of the app shell. If yes, we download and cache this version to use it for the next application run. Also, we might want to ask the user if they want to reload the current tab with the application right now. PWA: Create a “New Update Available” Notification using Service Workers
On ionic-team/ionic-pwa-toolkit they are doing it, with workbox, using this bit of code (via onstatechange EventListener) for registering the service worker and then listening to that event in one of components and then just showing a toast based on that.
@Listen('window:swUpdate')
async onSWUpdate() {
const toast = await this.toastCtrl.create({
message: 'New version available',
showCloseButton: true,
closeButtonText: 'Reload'
});
await toast.present();
await toast.onWillDismiss();
window.location.reload();
}
- Angular 5 service worker and AngularFirebase
- angular-university.io: practical guided Tour of Service Workers
- Angular 5 Service Worker
- Create a PWA with Angular Service Workers in Ionic 4
- A new Angular Service Worker — creating automatic progressive web apps
- Adding a @angular/service-worker on Ionic 3
- SERVICE WORKER issues faced on feedgist project
- problem in registering service worker in module where also importing AngularFire2
Desktop progressive web apps can be 'installed' on the users device much like native apps. They're fast. Feel integrated because they launched in the same way as other apps, and run in an app window, without an address bar or tabs. They're reliable because service workers can cache all of the assets they need to run. And they create an engaging experience for users.
Desktop Progressive Web App support is available on Chrome OS 67 (currently beta), but work is underway to support Mac and Windows. To experiment with desktop progressive web apps in Chrome an other operating systems, enable the #enable-desktop-pwas flag (chrome://flags/).
See also https://www.xda-developers.com/progressive-web-apps-chrome-how-to/
https://documentation.onesignal.com/docs/web-push-typical-setup
- Live feed display a list of comments
- Comments are posted by App users directly on live feed or as comment of a post.
- Comments of post could be promoted to live feed by admin.
- A comment include:
- description
- (picture|media ???)
- (link)
- (postId) // when from post
- When promoted, comment include a link (label + url) to post source
- should be improved, at the moment we add a itemId property on comment (same value of postId from original comment but rename it to not fetch the comment on post). Unique way we've find to preserve the navigationHistory and transition but not represent a generic solution for external links.
- Each comment could be deleted by its owner and admin.
- Each user is defined by:
- first_name
- last_name
- (picture)
- Admin can respond by email to a comment
- Comments could be published = {true|false} by admin
- By default all comments.published == true if admin
- default commment.published if user should be customizable by app
- Admin can filter comments by published property
- Admin can toggle published property
- User can react once to comment by Like/Clap, and discard its reaction
- User should be notified by a visual marker when new post is available since its last view.
- When promoted the comment is copied to appear o live feed
- comment's post have a postId propery to identify them
- Add actions on left side of sliding-item: promote, remove, hide/show
- should be improved, at the moment it's the best solution to not conflict with swipeable tabs. Another option could be a 3 dots button to show actions menu (like youtube).
https://imageresizing.net/docs/basics
- save user token on login
- On bootstrap load userAuth (auto-login)
- set X-Visitor-token for meumobi api calls on httpInterceptor
- if userAuth missing redirect to /login (=>prevent access if not logged)
- If meumobi api call return a 401 (Unauthorized) redirect to login
- done using httpInterceptor and Observable (logout)
@Injectable() export class AuthService {
public $logged = new Subject();
constructor() { }
}
httpInterceptor: if 401 then AuthService.$logged.next()
import { Storage } from '@ionic/storage'; this.storage.{get|set}('userAuth, response)
export class AppComponent implements OnInit, OnDestroy {
private authObserver: Subscription;
ngOnInit() { this.authState = AuthService.authState; this.authObserver = this.authState.subscribe((user: userAuth) => { if(!user) logout }) }
ngOnDestroy() { if (this.authObserver) { this.authObserver.unsubscribe(); } } }
- Angular 4.3 HttpClient (Accessing REST Web Services With Angular)
- Angular.io HttpClient
- Angular 4.3 Interceptors for Lazy Loaded Modules
- Use interceptor for components in shared modules
https://scotch.io/tutorials/build-an-ionic-app-with-user-authentication http://jasonwatmore.com/post/2014/05/26/angularjs-basic-http-authentication-example https://devdactic.com/ionic-auth-guards/
The Ionic image gallery is a classic pattern used in many applications which need to display any kind of grid with pictures or photos. For the image gallery. We can make use of the ion-slides component, and the Riron/ionic-img-viewer component which helps us to display a selected picture in fullscreen with zooming options.
ngx-translate is an internationalization library for Angular 2+. It lets you define translations for your content in different languages and switch between them easily. We've followed
- Ionic 3 | Translate and Localize Your App With ngx-translate
- ionicframewokr docs: Using ngx-translate
- this doc is outdated, continue using
HttpModule
(deprecated) instead ofHttpClientModule
.
- this doc is outdated, continue using
Ionic v3 is compatible with @ngx-translate/[email protected]
and @ngx-translate/[email protected]
, upper versions require angular 6. Check breaking changes on changelog of these projects for more details.
Should save selected language on App, and load it when launch.
For unit testing we've tried implementation based on example providing from ngx-translate repo, but it was not successful. An extensive thread about unit testing take place on github repo of the project.
ngx-moment provides moment.js pipes for Angular.
- UiGradients Beautiful colour gradients for design and code
- github/mraible/ng2-demo:Angular and Angular CLI Tutorial