10 2016 档案
摘要:To do auth, first you need to go firebase.console.com to enable the auth methods, for example, enable google, github... Enable goolge is quite simple,
阅读全文
摘要:'signupForm' is a formGroup. we can use 'hasError' & 'get()' methods to write the code. Refer to: Article && Doc
阅读全文
摘要:Learn how to create a custom validator to check whether passwords match. confirmPasword validator is just a function, also a curry function. So it mea
阅读全文
摘要:Learn how to update part of form model, full form model and reset whole form. We have form definetion like this:
阅读全文
摘要:In this lesson, we are going to learn how to interact with native components through Cordova plugins. We will walk through how to add a Cordova plugin
阅读全文
摘要:In this tutorial we are going to learn how we can also implement custom form field validation in Angular 2 template driven forms, by creating our own
阅读全文
摘要:In this tutorial we are going to learn how simple it is to create custom form field driven validators while using Angular 2 model driven forms. These
阅读全文
摘要:When easing isn’t enough to get the exact animation you want, you can leverage keyframes to define and precise styles and steps over time. Keyframes a
阅读全文
摘要:By default, transitions will appear linearly over time, but proper animations have a bit more customization to them by delaying when they start and co
阅读全文
摘要:Each trigger starts with an “undefined” state or a “void” state which doesn’t match any of your currently defined states. You have to be aware of when
阅读全文
摘要:When you create a pseudo element, you have access to the parent HTML attributes. They can be used inside the content attribute of a pseudo element.
阅读全文
摘要:In this tutorial we are going to learn how we mark form fields in error and display error messages to the user in the case of Angular 2 model driven f
阅读全文
摘要:Resize images and videos to fill their parent and maintain their aspect ratio with pure CSS. The new object-fit and object-position properties allow y
阅读全文
摘要:For each formBuild, formControl, formGroup they all have 'valueChanges' prop, which is an Observable. If you want to only update form data model when
阅读全文
摘要:As a conclusion to this course about RxJS subjects, let's review when and why should you use them. For certain cases, subjects are absolutely necessar
阅读全文
摘要:Let's explore a different use of the multicast() operator in RxJS, where you can provide a selector function as a sandbox where the shared Observable
阅读全文
摘要:The way we use publish() (or multicast with an RxJS Subject) makes the shared Observable not reusable if the shared execution happens to complete or e
阅读全文
摘要:Import module: Define the html: ts: group() function take an object param, each object stands for a field in template, which refer to 'formControlName
阅读全文
摘要:The Element Inspector in Chrome DevTools offers powerful integration with the console - learn how to programmatically navigate your selected element,
阅读全文
摘要:In this lesson we will use Flexbox to scale a background image to fit on the screen of our React Native application.
阅读全文
摘要:Because using multicast with a new Subject is such a common pattern, there is a shortcut in RxJS for this: the publish() operator. This lesson introdu
阅读全文
摘要:With the connect() method on a ConnectableObservable, the programmer is responsible for avoiding leaked executions of shared RxJS Observables. This le
阅读全文
摘要:ConnectableObservable has the connect() method to conveniently dictate the start of the shared execution of the source Observable. However, we need a
阅读全文
摘要:Angular 1 provided a mechanism to place content from your template inside of another template called transclusion. This concept has been brought into
阅读全文
摘要:We have seen how Subjects are useful for sharing an execution of an RxJS observable to multiple observers. However, this technique requires some labor
阅读全文
摘要:This lesson will teach you about AsyncSubject, another type of Subject with some replaying logic inside. We will also look at some use cases for this
阅读全文
摘要:CSS counters let you create dynamic lists without JavaScript. In this lesson, we will create a multi-level table of contents using the CSS counter-res
阅读全文
摘要:You can target an element that has no child elements by using the :empty pseudo-class. With browser support down to IE9, it's solid, easy way to selec
阅读全文
摘要:Animation start in 'trigger' function. Give a name call 'courseHover'. Animation also define 'state', and using 'transition' to animte the state. So w
阅读全文
摘要:Article Github Auxiliary Routes is is little bit hard to understand. Here is demo, link You can see each category has an own 'View detials' button, an
阅读全文
摘要:Let's see how to do pagination in Firebase: For the init loading, we only want 3 items: 'limitToFirst' --> If not given 'startAt', will start from ind
阅读全文
摘要:It can be painful to write the same function repeatedly with different types. Typescript generics allow us to write 1 function and maintain whatever t
阅读全文
摘要:Sometimes the compiler needs help figuring out a type. In this lesson we learn how to help out the compiler with Typescript type assertion. We have a
阅读全文
摘要:Typescript classes make inheritance much easier to write and understand. In this lesson we look into how to set up inheritance with Typescript classes
阅读全文
摘要:Typescript classes make traditional object oriented programming easier to read and write. In this lesson we learn about class syntax, what the constru
阅读全文
摘要:From router v3.1.0, we have preloading system with router. After the init module loaded, router will preloading the rest module at the background. Cus
阅读全文
摘要:Yarn is a new JavaScript package manager that aims to be speedy, deterministic, and secure. See how easy it is to drop yarn in where you were using np
阅读全文
摘要:Using the Snippets tab in the source devtool you can define and run arbitrary pieces of code in your browser against whatever website you’re looking a
阅读全文
摘要:Artical --> BYPASSING PROVIDERS IN ANGULAR 2 Here trying to solve one problem: On the left hand side of tree, there are 4 green blocks and 1 blue bloc
阅读全文
摘要:Lets see how to query Firebase. First thing, when we do query, 'index' will always help, for both SQL and NoSQL. In Firebase, we can also set index on
阅读全文
摘要:Getter on Object: 1. prop: 2. props: Setter ob Object: Another way to use Lens:
阅读全文
摘要:Index router as default router. Index router, usually comes as last, just right before the fallback router.
阅读全文
摘要:It’s easy to pass the wrong value to a function. Typescript interfaces are great because they catch errors at compile time or in an IDE. In this lesso
阅读全文
摘要:A BehaviorSubject can remember the latest value emitted, but what if we wanted Observer B to see all the previous values emitted in the past? We can't
阅读全文
摘要:Sometimes you need to filter an array of objects or perform other conditional logic based on a combination of factors. Ramda's where function gives yo
阅读全文
摘要:Pluck: Get one prop from the object array: Props:
阅读全文
摘要:Take a function as arguement, and the function only return true of false. If the function 'f' return ture, when complement(f) will return false. var i
阅读全文
摘要:In JavaScript, many libraries use string arguments to change behavior. In this lesson we learn how Typescript catches string related errors at compile
阅读全文
摘要:Now is a great way to deploy your node application, but the generated URLs aren't memorable or easily remembered. With Now's alias command, you can fi
阅读全文
摘要:CSS calc() allows you to mix and match units to get real-time calculations. It's useful when you need to size elements but you have some unknown numbe
阅读全文
摘要:When to use Interface and when to use Class. Let's see one example: We have an Interface 'Lesson' and a Class 'Lesson'. At this point, I would love to
阅读全文
摘要:Sometimes we want our function arguments to be able to accept more than 1 type; e.g. a string or an array. This lesson will show us how to assign more
阅读全文
摘要:When an Observer subscribe to a BehaviorSubject. It receivces the last emitted value and then all the subsequent values. BehaviorSubject requires that
阅读全文
摘要:This lesson teaches you how a Subject is simply a hybrid of Observable and Observer which can act as a bridge between the source Observable and multip
阅读全文
摘要:import { Injectable } from '@angular/core'; import {RealtimeService} from "../shared"; import {FirebaseListObservable} from "angularfire2"; @Injectable() export class CourseService { courses$: Fi...
阅读全文
摘要:In this lesson we are going to learn how to use AngularFire 2 to query objects, and read them from the Firebase realtime database. In this lesson we a
阅读全文
摘要:In this lesson we are going to use AngularFire 2 for the first time. We are going to configure the AngularFire 2 module, inject the AngularFire servic
阅读全文
摘要:In this tutorial we are going to learn how we can can configure redirects in the angular 2 router configuration. We are also going to see again anothe
阅读全文
摘要:Applications require a lot of sensitive information. Database passwords, API keys and secrets used for signing JWTs, just to name a few. If you're dep
阅读全文
摘要:In this tutorial we are going to learn how we can can configure redirects in the angular 2 router configuration. We are also going to see again anothe
阅读全文
摘要:Property access in Javascript can be problematic - especially when dealing with nested Objects and Arrays. Doing it manually and in a safe manner requ
阅读全文
摘要:Learn how to use CSS columns to quickly lay out fluid columns that are responsive, degrade gracefully and don't require extra markup. Notes: column-wi
阅读全文
摘要:Each time you use the Async Pipe, you create a new subscription to the stream in the template. This can cause undesired behavior especially when netwo
阅读全文
摘要:Source You can also start a chain of then() method calls via Promise.resolve() and execute the synchronous code inside a callback: An alternative is t
阅读全文