Angular2 的material中 引用了 hammerjs,遇到Could not find HammerJS错误,正确的步骤如下: 需要在如下位置增加 对material 和 hammerjs的引用 1. package.json { "name": "housekeeping-ui", "version": "1.0.0", "description": "housekeeping-ui…
视频简介 ASP.NET Core Web API + Angular 6的教学视频 我是后端开发人员, 前端的Angular部分讲的比较差一些, 可以直接看代码!!!! 这是一个小项目的实战视频, 该项目采用了: ASP.NET Core 2.1 做API Identity Server 4 Angular 6 Angular Material 这个项目比较简单, 适合ASP.NET Core Web API 和 Angular 初学者. 项目最终完成的效果如图: 视频目录 视频专辑地址: h…
一.页面代码 <select id="sponsorId" select2 ng-model="sponsorSelectedObj" ng-change="sponsorSelectedChange(sponsorSelectedObj)"> <option value="">共同创办人</option> <!--注意,这里不是在select标签写的ng-option,而是在opti…
Both Smart Components and Presentation Components receive data from Services in entirely different ways. Smart Components use constructor injection to lookup the entire service from the injector while Angular 2 Presentation components take the data f…
下面这篇文章最终的结论就是 Flot 插件 结合 Angular 的Directive 来处理 图表的绘制 给出github上的一个demo源码.https://gist.github.com/flyysr/ba3a51cdbfcae7f53dec 最近项目中遇到了要显示图形报表的问题,项目的前端架构主要是基于 AngularJs 的,故,找js插件来显示图表(chart). 找到了Flot (http://www.flotcharts.org/), 说明一下,Flot是一个绘制图表的Js库.…
ngRoute $routeProvider 配置路由的时候使用. 方法: when(path,route); 在$route服务里添加一个新的路由. path:该路由的路径. route:路由映射信息. controller:字符串或函数,指定控制器. controllerAs:一个用于控制器的标识符名称.. template:字符串或函数,html模板. templateUrl:字符串或函数,html模板的地址. resolve:对象,一个应该注入控制器的可选的映射依赖关系.如果任何一个依赖…
1.卸载 npm uninstall -g @angular/cli 2.清除缓存 npm cache verify 3.查看是否卸载成功 ng v //如果显示ng 不是内部或外部的指令 则证明卸载成功 4.ng v 查看版本是否安装成功 ,如果显示的版本和之前安装的一样,那需要关闭当前cmd  重新打开cmd 再次输入ng v 查看是否降级成功…
When migrating AngularJS (v1.x) applications to Angular you have different options. Using Angular Elements is one of them. In this lesson we learn how to integrate an Angular Element into an AngularJS (v1.x) application. We will leverage some feature…
一句话: 它们Angular框架声明周期的各个阶段,常规约定各专注于特定功能,经过处理也可以互相替换 1.功能细分简解 $http 类似JQuery ajax,支持promise $http.jsonp 跨域访问,只支持json数据格式,不支持文本,html等其他格式 $httpProvider 主要在config中使用,做http通用设置 <label>JSONP 实例, Http promise实例</label> <div ng-controller="Jso…
一句话: 它们Angular框架声明周期的各个阶段,常规约定各专注于特定功能,经过处理也可以互相替换 1.功能细分简解 config Angular module模块的加载阶段-应用在此时还没有启动 run Angular应用是第一个被运行的方法,相当于其它语言中的main()方法 factory factory() 方法是创建和配置服务的最快捷方式,单例对象,在应用的生命周期内只会被调用一次注入factory,相当于注入factory定义时的函数调用入口.用 Factory 就是创建一个对象,…