For example we have a component: <Card ></Card> And a driective: <Card highlighted></Card> We want to get the driective instant inside the component code, we can use @ViewChild: @ViewChild(CardComponennt, {read: HighlightedDirectiv…
Create a directive to check no special characters allowed: import {Directive, forwardRef} from '@angular/core'; import {AbstractControl, NG_VALIDATORS, Validator} from '@angular/forms'; @Directive({ selector: `[formControl][no-special-chars], [formCo…
Creating Custom Layouts 创建自定义布局 Before you start building custom layouts, consider whether doing so is really necessary. The UICollectionViewFlowLayout class provides a significant amount of behavior that has already been optimized for efficiency and…
babel.min.js!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Babel=t():e.Babel=t…
使用 Eclipse Modeling Framework 进行建模,第 2 部分 Eclipse 的 Java Emitter Templates(JET) 是一个开放源代码工具,可以在 Eclipse Modeling Framework(EMF)中生成代码. JET 与 JSP 非常类似,不同之处在于 JET 功能更强大,也更灵活,可以生成 Java. SQL 和任何其他语言的代码,包括 JSP.本文将介绍如何创建和配置 JET,并将其部署到各种环境中. Java Emitter Temp…
「 Vue很难学吗 」 对于我这种从0.x版本就开始体验 vuejs 的人来说,当然不算难,那时候没各种脚手架和复杂搭配,仅仅是一个mvvm的解决方案库而已,解决了jq带来的繁琐操作dom痛点,所以就一直用了. 我最早用的是AngularJs,那时候15年也是刚传到国内,踩了很多坑这方面的坑,各种文档.API 和解决方案都不完善,所以知道从新学一个新的概念框架的难处和雷点,最近Vue发展的很好,也是华人所写,所以普及度很高,文档好,语法简介收获了一大批忠实深度用户,我之前web入坑系列文章也分析…
起步 1. 扎实的 JavaScript / HTML / CSS 基本功.这是前置条件. 2. 通读官方教程 (guide) 的基础篇.不要用任何构建工具,就只用最简单的 <script>,把教程里的例子模仿一遍,理解用法.不推荐上来就直接用 vue-cli 构建项目,尤其是如果没有 Node/Webpack 基础. 3. 照着官网上的示例,自己想一些类似的例子,模仿着实现来练手,加深理解. 4. 阅读官方教程进阶篇的前半部分,到『自定义指令 (Custom Directive) 』为止.着…
概述: 鉴于本人初学,使用的编译器是webStorm,需添加对VUE的支持,添加方法可以参考 http://www.jianshu.com/p/142dae4f8b51. 起步: 1. 扎实的 JavaScript.HTML . CSS 基本功,这是接触vue的前提条件. 2. 学习vue官方的基础内容.不要构建工具webpack,只是页面<script>引入vue.js,把基础教程里的例子模仿练习,理解用法.如果没有 Node/Webpack 基础,不建议直接用 vue-cli 构建项目.…
以前我们用Jquery进行dom的操作,虽然熟悉后开发效率很高,但是如果多个控件的相互操作多的情况下,还是会乱.相比之下,Vue的使用更加清晰,通过虚拟dom将数据绑定,而且组件化和路由的帮助下,让整个网页符合SPA(Single Page Application)的潮流趋势.如果你懂的Angular.js,那么Vue.js就是囊中之物. <div id="app"> <p>{{ message }}</p> <input v-model=&q…
Conceptual Overview Template(模板): HTML with additional markup (就是增加了新的标记的HTML) Directive(指令): extend HTML with custom attributes and elements (给HTML增加自定义属性和元素) Model(模型): the data shown to the user in the view and with which the user interacts (与用户交互…