Giter VIP home page Giter VIP logo

diario's Introduction

Welcome to Diar.io

  • Ionic: 6.20.8
  • AngularFire: 7.5

This is a 10-hour web competency project. I'll use this README.md to explain myself a little and discuss parts of the app that could be done in different ways.

Notes

Icons

I didn't get around to doing this, but I should have put icons on all the buttons and then use a media/container query to only show the icon on small screens, but show the text and icon on larger screens.

BaseComponent

I like to have a BaseComponent (saved in src/app/shared/components/base.component.ts) which has a simple addSubscriptions method that takes a variable list of Subscription and handles correctly unsubscribing from them in the ngOnDestroy method. I put this in initially but haven't really needed to use this in this project, as I've been able to leave the handling to the async pipe in the HTML.

DataModels

I like to keep data model class definitions in a separate file to the service, I've found this reduces clutter. But equally you could move the deserialize() method into the service and keep the class definition file a bit slimmer.

AngularFire syntax

It seems AngularFire has just been updated but its docs haven't. For example it suggests to fetch a collection using the syntax ...

constructor(firestore: Firestore) {
    const collection = collection(firestore, 'items');
    this.item$ = collectionData(collection);
};

but then its section on querying uses the older syntax like ...

constructor(firestore: AngularFirestore) {
    this.items = firestore.collection('items').valueChanges();
}

so it's been a little confusing!

diario's People

Contributors

momargoh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.