07 2017 档案

摘要:Some browsers, such as Safari < 10 & IE < 11, do not support the JavaScript Internationalization API, which react-intl depends on. In order to support 阅读全文
posted @ 2017-07-31 21:43 Zhentiw 阅读(417) 评论(0) 推荐(0) 编辑
摘要:In some cases, you might need to pass a string from your intl messages.js file as a prop to a component. Instead of using react-intl components (which 阅读全文
posted @ 2017-07-31 21:06 Zhentiw 阅读(302) 评论(0) 推荐(0) 编辑
摘要:Get 'injectIntl' from 'react-intl', it is a high order componet. We need to wrap our component into 'injectIntl': It will inject 'intl' prop into our 阅读全文
posted @ 2017-07-31 21:02 Zhentiw 阅读(279) 评论(0) 推荐(0) 编辑
摘要:Using the react-intl FormattedMessage component, we’ll learn how to render content conditionally in our messages based on a number provided as a prop. 阅读全文
posted @ 2017-07-31 15:53 Zhentiw 阅读(229) 评论(0) 推荐(0) 编辑
摘要:Simple Auth service: Using Observable is a easy way to implement reactive application. Create a BehaviorSubject and then convert subject to Observable 阅读全文
posted @ 2017-07-30 18:18 Zhentiw 阅读(260) 评论(0) 推荐(0) 编辑
摘要:Using a react-intl FormattedNumber component, we'll pass a Number and a few additional props in order to render the correct separator and currency sym 阅读全文
posted @ 2017-07-28 20:18 Zhentiw 阅读(317) 评论(0) 推荐(0) 编辑
摘要:Given a date, we’ll use the react-intl FormattedRelative component to render a date in a human readable format, such as “2 days ago”, in various langu 阅读全文
posted @ 2017-07-28 20:09 Zhentiw 阅读(292) 评论(0) 推荐(0) 编辑
摘要:Using the react-intl FormattedDate and FormattedTime components, we’ll render a JavaScript Date into both a date string and a time string in different 阅读全文
posted @ 2017-07-28 20:01 Zhentiw 阅读(731) 评论(0) 推荐(0) 编辑
摘要:In this lesson, we’ll use the react-intl FormattedHTMLMessage component to display text with dynamic values along with other HTML elements to create e 阅读全文
posted @ 2017-07-28 19:52 Zhentiw 阅读(682) 评论(0) 推荐(0) 编辑
摘要:Learn how to use react-intl to set dynamic values into your language messages. We’ll also learn how to pass in those values by using a values prop in 阅读全文
posted @ 2017-07-28 19:45 Zhentiw 阅读(379) 评论(0) 推荐(0) 编辑
摘要:We’ll install react-intl, then add it to the mounting point of our React app. Then, we’ll use react-intl helpers to load locales in our app, including 阅读全文
posted @ 2017-07-28 18:31 Zhentiw 阅读(331) 评论(0) 推荐(0) 编辑
摘要:For example, inside you component you want to import a file from two up directory: This becomes a little bit problematic because the component can be 阅读全文
posted @ 2017-07-28 02:30 Zhentiw 阅读(222) 评论(0) 推荐(0) 编辑
摘要:We have two blocks to show to difference ways to do animation in Angular: heightZeroFull using animation(). heightState using state(). The way to cont 阅读全文
posted @ 2017-07-27 02:53 Zhentiw 阅读(235) 评论(0) 推荐(0) 编辑
摘要:In large applications, dividing the application into smaller chunks is often times necessary. In this lesson, we will look at how vue loads async comp 阅读全文
posted @ 2017-07-26 16:10 Zhentiw 阅读(301) 评论(0) 推荐(0) 编辑
摘要:To define an Angular Animation, we using DSL type of language. Means we are going to define few animations ('fadeIn', 'fadeOut'). Then we need to defi 阅读全文
posted @ 2017-07-26 02:26 Zhentiw 阅读(1151) 评论(0) 推荐(0) 编辑
摘要:When we "Tab" into a input field, we want to select all the content, if we start typing, it should remove the existing content and add new content. We 阅读全文
posted @ 2017-07-26 01:55 Zhentiw 阅读(1052) 评论(0) 推荐(0) 编辑
摘要:You often use the same data in different ways across pages. This lesson walks you through setting up multiple pages, retrieving the same data, then di 阅读全文
posted @ 2017-07-25 21:25 Zhentiw 阅读(256) 评论(0) 推荐(0) 编辑
摘要:You can conditionally add classes to Vue.js templates using v-bind:class. This will help display the status of a todo as you add a Vuex action to patc 阅读全文
posted @ 2017-07-25 21:16 Zhentiw 阅读(400) 评论(0) 推荐(0) 编辑
摘要:You'll begin to notice as you build out your actions in Vuex, many of them will look quite similar. Creating a remove action looks almost the same as 阅读全文
posted @ 2017-07-25 21:07 Zhentiw 阅读(326) 评论(0) 推荐(0) 编辑
摘要:The default behavior of submitting an HTML form is to reload the page. You can use the Vue.js @submit.prevent syntax to avoid that behavior. Then wire 阅读全文
posted @ 2017-07-25 20:58 Zhentiw 阅读(1008) 评论(0) 推荐(0) 编辑
摘要:You can isolate parts of templates you want to re-use into components, but you can also reuse those components across pages using layouts. This lesson 阅读全文
posted @ 2017-07-25 20:33 Zhentiw 阅读(375) 评论(0) 推荐(0) 编辑
摘要:Because Nuxt renders pages on the server, you should use the nuxt-link components to navigate between pages. Each time a page loads, you can check if 阅读全文
posted @ 2017-07-24 20:12 Zhentiw 阅读(433) 评论(0) 推荐(0) 编辑
摘要:In a server-rendered application, if you attempt to load data before the page renders and the data fails to load, your application will not run unless 阅读全文
posted @ 2017-07-24 19:47 Zhentiw 阅读(288) 评论(0) 推荐(0) 编辑
摘要:You add array of todos to the store simply by adding them to the state defined in your store/index.js file. You can access the array of todos using ma 阅读全文
posted @ 2017-07-24 18:10 Zhentiw 阅读(228) 评论(0) 推荐(0) 编辑
摘要:You can easily add CSS libraries to Nuxt using yarn or npm to install them, then simply adding them to the nuxt.config.js so they're included in each 阅读全文
posted @ 2017-07-24 17:57 Zhentiw 阅读(282) 评论(0) 推荐(0) 编辑
摘要:You commit changes to state in Vuex using defined mutations. You can easily access these state mutations in your template using mapMutations. This les 阅读全文
posted @ 2017-07-24 15:59 Zhentiw 阅读(326) 评论(0) 推荐(0) 编辑
摘要:Install: Init project: Run: Create a index.js file inside store folder: Display the counter inside pages/index.vue: mapState: return a state tree obje 阅读全文
posted @ 2017-07-24 15:33 Zhentiw 阅读(216) 评论(0) 推荐(0) 编辑
摘要:We can use 'type' keyword to define a function type. 'digitValidators', is a mapping object, return a function which type is DigitValidator. 阅读全文
posted @ 2017-07-24 02:41 Zhentiw 阅读(461) 评论(0) 推荐(0) 编辑
摘要:We can use 'setSelectionRange(start, end)' to set cursor postion, in which start postion = end position. 阅读全文
posted @ 2017-07-24 02:28 Zhentiw 阅读(454) 评论(0) 推荐(0) 编辑
摘要:@HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { if(keyCode !== TAB) { $event.preventDefault(); } // get value for the key ... 阅读全文
posted @ 2017-07-24 01:56 Zhentiw 阅读(276) 评论(0) 推荐(0) 编辑
摘要:We are going to see how to using method arguments for @HostListener. First, we can use HostListener without method arguments: It works fine. But if we 阅读全文
posted @ 2017-07-23 21:07 Zhentiw 阅读(296) 评论(0) 推荐(0) 编辑
摘要:Docker containers are stateless by default. In order to persist filesystem changes, you must use docker volumes. In this lesson, we will go over how t 阅读全文
posted @ 2017-07-21 20:20 Zhentiw 阅读(245) 评论(0) 推荐(0) 编辑
摘要:(binary search trees) which form the basis of modern databases and immutable data structures. Binary search works very much the way humans intuitively 阅读全文
posted @ 2017-07-21 20:05 Zhentiw 阅读(285) 评论(0) 推荐(0) 编辑
摘要:Learn how to setup an Nginx proxy server that sits in front of a Node.js app. You can use a proxy to control the flow of frontend requests hitting you 阅读全文
posted @ 2017-07-21 16:33 Zhentiw 阅读(248) 评论(0) 推荐(0) 编辑
摘要:In the past, you've needed to either write a package.json script or use the node_modules/.bin directory to access binaries installed in your node_modu 阅读全文
posted @ 2017-07-21 15:14 Zhentiw 阅读(154) 评论(0) 推荐(0) 编辑
摘要:We will look at what CSS selectors to use to change an HTML5 inputs placeholder color. This can differ from browser to browser, so, we will make sure 阅读全文
posted @ 2017-07-20 20:26 Zhentiw 阅读(162) 评论(0) 推荐(0) 编辑
摘要:As node projects evolve, new features are added all the time. This results in different errors or results as you're migrating from one version to anot 阅读全文
posted @ 2017-07-20 16:33 Zhentiw 阅读(165) 评论(0) 推荐(0) 编辑
摘要:For example, we have a modal component, it can config that using ng-template as a configurable template. Now what we want to do is to pass in inputs t 阅读全文
posted @ 2017-07-02 20:14 Zhentiw 阅读(242) 评论(0) 推荐(0) 编辑
摘要:Now for au-modal component, we pass in tow component though contenct projection: One is 'au-tab-panel' which contains all the content body for modal. 阅读全文
posted @ 2017-07-02 19:33 Zhentiw 阅读(409) 评论(0) 推荐(0) 编辑
摘要:If we want to add global event handler, we can use 'EventManager' from '@angular/platform-broswer'. Now we have a modal component, we want to click 'E 阅读全文
posted @ 2017-07-02 19:14 Zhentiw 阅读(453) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示