随笔分类 -  Angular

摘要:在 <cdk-virtual-scroll-viewport> 里有 ngIf 是不支持的 <cdk-virtual-scroll-viewport [itemSize]="18" class="example-viewport"> <div *cdkVirtualFor="let item of 阅读全文
posted @ 2021-02-04 12:30 泉油 阅读(817) 评论(0) 推荐(0)
摘要:Angular sticky 会很快的去拿 cell width 作为要 sticky 的 position 中了一个坑 我们需要在之后去 binding class, 这时已经来不及了, 因为 sticky 很早就拿了 cell width, 所以只能去 manual run update sti 阅读全文
posted @ 2021-02-02 11:06 泉油 阅读(92) 评论(0) 推荐(0)
摘要:源码链接:https://github.com/angular/angular/blob/master/packages/animations/src/animation_metadata.ts 在开始前,我们先不管如何写动画,先看trigger是什么,所有的trigger都可以直接绑定elemen 阅读全文
posted @ 2017-06-14 10:54 泉油 阅读(660) 评论(0) 推荐(0)
摘要:好久没有在这里写点笔记了。时隔已久,angular1 去 angular2 咯 笔记来源:https://angular.cn/docs/ts/latest/guide/animations.html 动画基于这标准:https://w3c.github.io/web-animations/ 以下是 阅读全文
posted @ 2017-03-01 23:00 泉油 阅读(1536) 评论(0) 推荐(0)
摘要:https://github.com/angular-ui/ui-router/issues/600https://github.com/angular-ui/ui-router/issues/2229看完以上的问题,可想是没有结果的!具体问题:$urlRouterProvider.when("/"... 阅读全文
posted @ 2015-10-30 18:40 泉油 阅读(136) 评论(0) 推荐(0)
摘要:destroy的目的是为了内存溢漏,这对性能会造成影响。angular scope在处理element 移除时,会触发destroy, 而调用逻辑和jquery使用的一样。在ck editor 中遇到一件事可以让自己参考ck editor 有自己的destroy event,在ng-repeat 中... 阅读全文
posted @ 2015-10-28 18:19 泉油 阅读(554) 评论(0) 推荐(0)
摘要:基本调用,得到name 属性 阅读全文
posted @ 2015-10-23 11:52 泉油 阅读(128) 评论(0) 推荐(0)
摘要:angular 1.5 beta linkNgModelControllerprovides API for thengModeldirective. The controller contains services for data-binding, validation, CSS updates... 阅读全文
posted @ 2015-10-22 14:05 泉油 阅读(370) 评论(0) 推荐(0)
摘要:$digest: function() { var watch, value, last, watchers, length, dirty, ttl = TTL, next, current, ta... 阅读全文
posted @ 2015-10-19 11:35 泉油 阅读(298) 评论(0) 推荐(0)
摘要:基本了解是阻止事件之前设置好的事件触发,像是angular router ui里的 preventDefault是这样的。在$stateChange的是后,可以调用preventDefault 来阻止,而这不是javascript自带功能,而是自己完成的。 preventDefault是一个沟通用的... 阅读全文
posted @ 2015-10-19 11:28 泉油 阅读(732) 评论(0) 推荐(0)
摘要:次序:angular 的 location会先跑$rootScope.$on("$locationChangeStart", function (scope, newUrl, oldUrl) { log("$locationChangeStart from " + oldUrl) log... 阅读全文
posted @ 2015-10-19 11:23 泉油 阅读(497) 评论(0) 推荐(0)
摘要:{{ abc | myFilter }}angular.module('myStatefulFilterApp', []).filter('decorate', ['decoration', function(decoration) { function decorateFilter(input)... 阅读全文
posted @ 2015-10-17 21:49 泉油 阅读(260) 评论(0) 推荐(0)
摘要:ng-messages="form['positionTitle' + languageVersion.typeEnum].$errorng-messages="form.positionTitle{{languageVersion.typeEnum}}.$error以上2个的表达式只有第1行可以,... 阅读全文
posted @ 2015-10-17 21:38 泉油 阅读(263) 评论(0) 推荐(0)
摘要:controller 会先跑,接着是view 里的ng-init,最后是link (指令里的)。所有在指令里如果用link去拿$attr,会有拿不到ng-init想setup的值 阅读全文
posted @ 2015-10-17 21:36 泉油 阅读(334) 评论(0) 推荐(0)
摘要:这是原文https://github.com/fatlinesofcode/ngDraggable这是另一个dnd,这比较灵活,可以监听事件。我只用简单的排序功能,其他没去了解太多。有机会遇到功能扩展,会在这里更新。功能与需求:-在angular filter orderBy 里 reorder 对... 阅读全文
posted @ 2015-07-09 13:14 泉油 阅读(1515) 评论(0) 推荐(0)
摘要:这是原文http://marceljuenemann.github.io/angular-drag-and-drop-lists/demo/#/simple看起来很多功能,所以我只记入我需要的部分就好,等下次需要更多功能,再添加笔记内容。简单需求:·在dnd时,array里的对象会因为dnd而排序·... 阅读全文
posted @ 2015-07-09 11:32 泉油 阅读(1838) 评论(0) 推荐(0)
摘要:在1.26版本,在url ("www.example.com#xx"),接着按back,会自动调到顶部,这是因为angular的默认设置只要在config注入$AnchorScrollProvider, 接着跑这个就行了$anchorScrollProvider.disableAutoScrolli... 阅读全文
posted @ 2014-12-29 13:34 泉油 阅读(574) 评论(0) 推荐(0)
摘要:{id:[0-9a-fA-F]{1,8}}如果在找ui-router 时,会看到以上的正则我解释一下id是param,可以把必备的结果收起来[]里面的必配的正则,但只是给一个string{}第几个到第几个要匹配的string以上会for loop 8次,每次看看单个string是否能不能匹配注意:如... 阅读全文
posted @ 2014-12-18 18:33 泉油 阅读(404) 评论(0) 推荐(1)
摘要:titleui-router 会去解析body里的ui-sref,title对ui-router来说是一种状态,接着会去找着状态$stateProvider .state('title', { url: '/title', ... })state就是状态,发现了就会把ti... 阅读全文
posted @ 2014-12-05 11:14 泉油 阅读(461) 评论(0) 推荐(0)
摘要:先看看以下的代码 以上 ^ : 一开始会显示ABC,2秒后会显示XYZ。*外面可以同步内部 app.controller("ctrl", function ($scope, $timeout) { $scope.name = "ABC"; ... 阅读全文
posted @ 2014-09-04 15:01 泉油 阅读(417) 评论(0) 推荐(0)

Web Design Johor Bahru Malaysia - Stooges