1.新建项目 2.新建Model public class TodoItem { public int Id { get; set; } public string Key { get; set; } public string Name { get; set; } public bool IsComplete { get; set; } public string Desc { get; set; } } 3.数据访问接口 public interface ITodoRepository {…
Angular2.0的项目架构 一.项目服务端app a) Controller控制器 b) Router路由 c) Service服务 d) Public公共样式及脚本和图片等静态资源 e) View静态页面 f) Engine公共的配置文件及方法 g) Extend框架扩展 h) Middleware编写中间件 二.项目客户端src a) App i. App.component.ts 组件 1.baAmChart.component.ts 2.装饰器@Component({}) a) Se…
Angular2学习笔记(1) 1. 写在前面 之前基于Electron写过一个Markdown编辑器.就其功能而言,主要功能已经实现,一些小的不影响使用的功能由于时间关系还没有完成:但就代码而言,之前主要使用的是jQuery,由于本人非专业前段,代码写的自己都感觉是"一塌糊涂",十分混乱.现在看到Angular2十分火爆,跑了跑它的The Tour of Heroes的例子,感觉非常不错,代码组织的井井有条,于是乎决定学习一下Angular2,然后用它将之前的NiceMark重写一下…