Skip to content

Instantly share code, notes, and snippets.

View thevinayysharma's full-sized avatar
🚀
building

Vinay Sharma thevinayysharma

🚀
building
View GitHub Profile

Everything I Know About UI Routing

Definitions

  1. Location - The location of the application. Usually just a URL, but the location can contain multiple pieces of information that can be used by an app
    1. pathname - The "file/directory" portion of the URL, like invoices/123
    2. search - The stuff after ? in a URL like /assignments?showGrades=1.
    3. query - A parsed version of search, usually an object but not a standard browser feature.
    4. hash - The # portion of the URL. This is not available to servers in request.url so its client only. By default it means which part of the page the user should be scrolled to, but developers use it for various things.
    5. state - Object associated with a location. Think of it like a hidden URL query. It's state you want to keep with a specific location, but you don't want it to be visible in the URL.
Covers:
Promises, basics, rule of promises, links, Quiz:


Earlier days, Callback pyramid was the only thing for doing several asyn functionalities. 
Error handler need to be written for every function operation. With Promise we can have a single catch.

A Promise is a object that simplify deferred and asynchronous computations.