08 2017 档案
摘要:For example we have the following code: Because we wrote as function component, it is using the implicit return. To debug what props have been passed
阅读全文
摘要:Here we have a force layout with three nodes. In the example, we will link three nodes with line and path:
阅读全文
摘要:For the whole signup process. we need to Hash the password to create a password digest Store the user's info and password digest into db Create a rand
阅读全文
摘要:Learn how to leverage d3's layout module to create a Force Layout inside of React. We'll take a look at React's lifecycle methods, using them to boots
阅读全文
摘要:When the data being rendered by a chart changes, sometimes it necessitates a change to the scales and axes of the chart as well. This lesson demonstra
阅读全文
摘要:In D3, the General Update Pattern is the name given to what happens when a data join is followed by operations on the enter, update, and exit selectio
阅读全文
摘要:After reading the blog, the main take away from there is: "Never send back JOSN array to the client side, it is easy to be hijacked, using JSON object
阅读全文
摘要:New use case that is supported by the HTTP client is Progress events. To receive these events, we create our HTTP request manually in the following wa
阅读全文
摘要:switchMap can chain two HTTP requests together, creating one request based on the results of the first request. But the result observable did not have
阅读全文
摘要:With the shareReplay operator in place, we would no longer fall into the situation where we have accidental multiple HTTP requests. And this covers th
阅读全文
摘要:From Angular V4, there is new HttpClient module, in which HttpHeaders is an immutable api.
阅读全文
摘要:It is possible to use HttpParams to set http params. For example we have this url to make: So there are two params: 1. orderby 2. limitToFirst Using H
阅读全文
摘要:D3 transitions start executing as soon as they’re created, and they’re destroyed once they end. This can present some challenges when attempting to cr
阅读全文
摘要:D3 makes it easy to add meaningful animations to your data visualizations. Whether it’s fading in new items or tweening existing shapes to display new
阅读全文
摘要:Since D3 outputs standard markup, you can use familiar dev tools and inspectors to debug your visualizations. In this lesson we’ll look at how to use
阅读全文
摘要:Create a directive to check no special characters allowed:
阅读全文
摘要:Similar to line charts, area charts are great for displaying temporal data. Whether you’re displaying a single set of data or multiple sets using an o
阅读全文
摘要:Since Node.js V8.0+, it introduces a 'util' libaray, which has a 'promisfy' function. It can conver a callback based function to promise based functio
阅读全文
摘要:We have a form component: the 'type' FormControl will be a custom form element component which refers to 'workout-type' componet. For the workout-type
阅读全文
摘要:In this lesson, we extend the styles of a base button component to create multiple variations of buttons, using "extend". We can then modify the base
阅读全文
摘要:In this lesson, we learn how to handle CSS keyframe animations in styled-components, via the 'keyframes' helper.
阅读全文
摘要:Currently, patchValue doesn't support update FormArray. The workarround is you need to empty the form array first, then add items back.
阅读全文
摘要:Which hash algorithom to choose for new application: https://www.owasp.org/index.php/Password_Storage_Cheat_Sheet Argon2[*7] is the winner of the pass
阅读全文
摘要:One thing that we can do is to add styles directly to HTML elements that live within our component. However, in this lesson we see that style classes
阅读全文
摘要:Angular has a very robust security model. Dynamically inserted html, style or url values into the DOM open up possibilities for attackers to compromis
阅读全文
摘要:Line charts are often used to plot temporal data, like a stock price over time. In this lesson we’ll see how to use D3 APIs to create our own simplifi
阅读全文
摘要:We will learn how to make use of the ngStyle directive to directly add multiple style attributes to a DOM element as a style property. We’ll also lear
阅读全文
摘要:Firebase cloud functions is similar to AWS lambda or serverless. You can deploy you code which wrote in Node.js and deploy to firebase. It can respons
阅读全文
摘要:In this styled-components lesson, we set a "primary color" within a UI "theme" object. We make this theme accessible to all components by wrapping our
阅读全文
摘要:It it recommeded that when deals with form component, we can create a container component to hold state, and then create a stateless component to enpo
阅读全文
摘要:Scatter plots, sometimes also known as bubble charts, are another common type of visualization. They’re extremely versatile thanks to their ability to
阅读全文
摘要:When you occured this problem, check few things: 2. About translations, sometime angular-translate also have problems with that:
阅读全文
摘要:From Anuglar v4 above, we are able to using 'as' with async pipe. This allow as using 'new variable' instead of subscribe to observable. We also able
阅读全文
摘要:Column and bar charts are staples of every visualization library. They also make a great project for combining the essential pieces of D3 like selecti
阅读全文
摘要:We cannot directly store user password in the database. What need to do is creating a hashed & salted string which reperstanting the user password. Th
阅读全文
摘要:For example, when we open a form, we want to see all the inputs fields comes into one by one. Code for html: So we add a animation to the container ca
阅读全文
摘要:Making SVGs responsive is unfortunately not as simple as adding some media queries. This lesson introduces the viewBox attribute, which is used to con
阅读全文
摘要:Most charts aren’t complete without axes to provide context and labeling for the graphical elements being displayed. This lesson introduces D3’s APIs
阅读全文
摘要:You can’t add axes to a chart if you don’t make room for them. To that end, the D3 community has adopted a simple convention for defining margin sizes
阅读全文
摘要:Most of D3’s native selection APIs also return the selection (or a new selection), to enable multiple method calls to be chained together. Since the c
阅读全文
摘要:Data visualizations are a lot more interesting when they’re interactive. Whether it’s clicks, roll overs, or drags, it makes things more compelling, a
阅读全文
摘要:A simple store implemenet: Using this store in AuthService: Using Reactive approach in app.component.ts:
阅读全文
摘要:Config AngularFire, we need database and auth module from firebase. For the SharedModule: We use forRoot method to register our AuthSerivce, so there
阅读全文
摘要:Most of the time, your components respond to events that occur within the component tree by defining their own handler or by accepting a handler defin
阅读全文
摘要:SVG is a great output format for data visualizations because of its scalability, but it comes with some idiosyncrasies and unique challenges. In this
阅读全文
摘要:It’s time to live up to D3’s true name and potential by integrating some real data into your visualization. This lesson introduces the fundamental con
阅读全文
摘要:Automate all the things!! Automation is crucial for increasing the quality and productivity. In this lesson we will learn how to automate the deployme
阅读全文
摘要:Being able to intercept HTTP requests is crucial in a real world application. Whether it is for error handling and logging or for injecting authentica
阅读全文
摘要:In this lesson, we see how we can apply styles globally with the "injectGlobal" helper method in styled-components. This method allows us to apply sty
阅读全文
摘要:In this lesson, we remove the mapping between a React component and the styles applied to it via classnames. We write our styles directly within the c
阅读全文
摘要:Change is good, but creating from scratch is even better. This lesson shows you how to create DOM elements from D3 and insert them into your document
阅读全文
摘要:Once you can get hold of DOM elements you’re ready to start changing them. Whether it’s changing colors, labels, or even link destinations, this lesso
阅读全文
摘要:Before you can create dazzling data driven documents, you need to know how D3 accesses the DOM. This lesson will show you the ins and outs of accessin
阅读全文