Angular

Angular2学习笔记2

每个angular2应用程序默认使用app目录来创建每个程序应当至少有一个angular模块即根模块。每个angular程序也至少有一个组件,根组件。装饰器内可以添加元数据如selector,templete等。插值表达式{{exp}}在templete模板中使用,取组件中的值。双向绑定[]作用在输入表单中,需要引入表单模块FormsModule。

angular的表格排序、分页和一些基本操作

老规矩先上项目目录结构:HTML代码如下:JS代码如下test.json数据如下:例如根据名称字段进行排序正序:倒序:这里是需要传到服务器的数据:至于对某一行进行增删改查操作的话,请参考我的自定义指令

Avalon,继Angular之后

而通过这段时间,在项目中对Avalon的应用,发现两者其实差不多。Avalon是一个功能强大,体积小巧的MVVM框架。下面列举的是Avalon的一些优势和与其他框架的一些比较,我觉得有了实践之后,体会更加深刻。对于Avalon,第一次听,没接触过,在团队的帮助下,得以让我很快地上手,也许是之前有些Angular的使用感受,所以在接触到了项目的前端之后,就让我很容易想到了Angular,最明显的特征就是双向的数据绑定。我也喜欢上这个Avalonjs了。

Angular2初探

Angular2是Google下一代MV*框架,用于构建复杂浏览器应用。Angular2给WEB或移动Apps带来了一揽子解决方案,从模板渲染到数据绑定,从Http服务到表单处理等等,总之,你想要的,Angular2基本上都已封装好了。万事始于HelloWorld,不论Angular2怎么牛,咱们先得把官方的例子跑起来再说。这里使用基于webpack创建Angular应用。环境准备nodev5.x.xnpmv3.x.xstep1:创建并配置本项目创建项目目录:创建配置文件典型的Angular项目需要一系列

Getting Started with AngularJS 1.5 and ES6: part1

GettingstartedGulpAngulargeneratorissimpleandstupid,butitdoesnotembraceAngular1.5completelyNow.AndIwouldlikeuseWebpackinthenewAngular1.xproject.AngularClassprovidesaverysimplemininalNG6-starterproject

Getting Started with AngularJS 1.5 and ES6: part 3

HandlingformsubmissionWehavecreatedpostslistpageandfetchedpostsdatafromrealremoteAPIs.Inbeforesteps,wehavecreateddummyfilesbygulpcomponentforaddingnewpostsandeditingexistingpost.Let'senrichthecontento

Getting Started with AngularJS 1.5 and ES6: part4

AuthenticationInarealworldapplication,itshouldprovidelogin,registrationandlogoutfeaturesforusers,andalsocanidentifyifauserhastherolesorpermissionstoaccesstheprotectedresources.Ihavesetaddingpostandedi

Getting Started with AngularJS 1.5 and ES6: part 6

I18nwithAngularTranslateYourapplicationCouldberequiredtosupportmulti-languages.Thereareafewsolutionstosupporti18ninAngularapplications.Angulartranslateisoneofthemostpopulars.Installangulartranslatepac