Dapper 简单封装
摘要:using System; using System.Collections.Generic; using System.Text; using Dapper; using System.Data; using System.Data.SqlClient; using System.Linq; using System.Linq.Expressions; using common.core.co...
阅读全文
posted @
2018-04-27 15:40
chester·chen
阅读(2431)
推荐(0) 编辑
angular ng-content
摘要:child works! 父组件投影 child works! 页头 页脚 import { Component } from '@angular/core'; @Component({ selector: 'app-root', templateUrl: './app.component.html', styleU...
阅读全文
posted @
2018-04-25 11:27
chester·chen
阅读(251)
推荐(0) 编辑
angular 父组件调用子组件
摘要:import { Component, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'app-child', templateUrl: './child.component.html', styleUrls: ['./child.component.css'] }) export class Ch...
阅读全文
posted @
2018-04-25 11:10
chester·chen
阅读(216)
推荐(0) 编辑
angular Docheck
摘要:import { Component, OnInit, Input, OnChanges, SimpleChanges, DoCheck } from '@angular/core'; @Component({ selector: 'app-child', templateUrl: './child.component.html', styleUrls: ['./child.com...
阅读全文
posted @
2018-04-25 10:41
chester·chen
阅读(253)
推荐(0) 编辑
angular OnChange事件
摘要:import { Component, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core'; @Component({ selector: 'app-child', templateUrl: './child.component.html', styleUrls: ['./child.component.cs...
阅读全文
posted @
2018-04-25 10:17
chester·chen
阅读(1089)
推荐(0) 编辑
angular 中间人模式
摘要:import { Component, OnInit, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'app-order-change', templateUrl: './order-change.component.html', styleUrls: ['./order-change.co...
阅读全文
posted @
2018-04-24 17:59
chester·chen
阅读(141)
推荐(0) 编辑
angular 输出属性
摘要:import { Component, OnInit, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'app-order-change', templateUrl: './order-change.component.html', styleUrls: ['./order-change.co...
阅读全文
posted @
2018-04-24 17:32
chester·chen
阅读(119)
推荐(0) 编辑
angular 输入属性
摘要:import { Component, OnInit, Input } from '@angular/core'; @Component({ selector: 'app-order', templateUrl: './order.component.html', styleUrls: ['./order.component.css'] }) export class OrderC...
阅读全文
posted @
2018-04-24 15:01
chester·chen
阅读(149)
推荐(0) 编辑
angular 管道
摘要:import { Pipe, PipeTransform } from '@angular/core'; @Pipe({ name: 'multi' }) export class MultiPipe implements PipeTransform { transform(value: any, args?: any): any { if (args == null) { ...
阅读全文
posted @
2018-04-23 19:43
chester·chen
阅读(721)
推荐(0) 编辑
angular 双向绑定
摘要:{{name}} import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-bind', templateUrl: './bind.component.html', styleUrls: ['./bind.component.css'] }) export class Bind...
阅读全文
posted @
2018-04-23 17:21
chester·chen
阅读(94)
推荐(0) 编辑
angular 样式属性绑定
摘要:点我 你好 你好 你好 你好 你好 import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-bind', templateUrl: './bi...
阅读全文
posted @
2018-04-23 17:10
chester·chen
阅读(180)
推荐(0) 编辑
angular 事件绑定
摘要:点我 import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-bind', templateUrl: './bind.component.html', styleUrls: ['./bind.component.css'] }) export class BindComponen...
阅读全文
posted @
2018-04-23 10:09
chester·chen
阅读(159)
推荐(0) 编辑
angular 工厂模式依赖注入
摘要:import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; import { AppComponent } from './app.component'; import { Product1Component } from './product1/pr...
阅读全文
posted @
2018-04-22 12:25
chester·chen
阅读(773)
推荐(0) 编辑
angular 服务之间依赖注入
摘要:import { Injectable } from '@angular/core'; @Injectable() export class LoggerServiceService { constructor() { } log(message: string) { console.log(message); } } import { Injectable } ...
阅读全文
posted @
2018-04-22 12:08
chester·chen
阅读(189)
推荐(0) 编辑
angular 第二种依赖注入
摘要:import { Injectable } from '@angular/core'; import { ProductServiceService, Product } from './product-service.service'; @Injectable() export class AnotherProductServiceService implements ProductServ...
阅读全文
posted @
2018-04-22 11:50
chester·chen
阅读(123)
推荐(0) 编辑
angular 基本依赖注入
摘要:import { Injectable } from '@angular/core'; @Injectable() export class ProductServiceService { constructor() { } getProduct(): Product { return new Product(1, "iPhone7"); } } export cl...
阅读全文
posted @
2018-04-22 11:46
chester·chen
阅读(115)
推荐(0) 编辑
angular resolve路由
摘要:import { Resolve, ActivatedRouteSnapshot, RouterStateSnapshot, Router } from "@angular/router"; import { Product } from "../product/product.component"; import { Observable } from "rxjs/Observable"; i...
阅读全文
posted @
2018-04-21 22:58
chester·chen
阅读(433)
推荐(0) 编辑
angular 守卫路由
摘要:import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { HomeComponent } from './home/home.component'; import { ProductComponent } from './...
阅读全文
posted @
2018-04-21 22:03
chester·chen
阅读(128)
推荐(0) 编辑
angular 子路由
摘要:const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'product/:id', component: Prod...
阅读全文
posted @
2018-04-21 20:58
chester·chen
阅读(122)
推荐(0) 编辑
angular 重定向路由
摘要:const routes: Routes = [ { path: '', redirectTo: '/home', pathMatch: 'full' }, { path: 'home', component: HomeComponent }, { path: 'product/:id', component: Prod...
阅读全文
posted @
2018-04-21 20:42
chester·chen
阅读(467)
推荐(0) 编辑
angular 新建组件
摘要:第一步:引入其他组件 ngFor指令与数据绑定(数据驱动视图) 父组件穿值到自组建
阅读全文
posted @
2018-04-20 18:19
chester·chen
阅读(175)
推荐(0) 编辑
angular 引入第三方库
摘要:第一步 --save:自动写入package.json 第二步: 第三部: 为了让typescript识别$ 第四步:
阅读全文
posted @
2018-04-20 14:28
chester·chen
阅读(127)
推荐(0) 编辑
angular启动过程
摘要:第一步: .angular-cli.json 第二步: 第三步: 第四步: 第五步:
阅读全文
posted @
2018-04-20 13:30
chester·chen
阅读(162)
推荐(0) 编辑
swagger接口文档
摘要:1 在Visual Studio 中创建一个Asp.NET WebApi 项目,项目名:Com.App.SysApi(本例创建的是 .net 4.5 框架程序) 2 打开Nuget 包管理软件,查找 swagger 安装Swashbuckle 组件 3 开启项目的XML注释位置(选中项目Com.Ap
阅读全文
posted @
2018-04-19 18:18
chester·chen
阅读(4406)
推荐(0) 编辑
MVC 登陆鉴权
摘要:public ActionResult Login(string data) { var _params = JsonConvert.DeserializeAnonymousType(data, new { userName = "", password = "" }); string userIdMd5 = _pa...
阅读全文
posted @
2018-04-18 16:58
chester·chen
阅读(455)
推荐(0) 编辑
MVC 异常过滤
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using cpf360.Common; using cpf360.DTO; namespace hanli_project.Filters { public class H...
阅读全文
posted @
2018-04-18 16:56
chester·chen
阅读(178)
推荐(0) 编辑
angular学习文章
摘要:https://www.jianshu.com/p/86c6249a2069 angular.cn https://segmentfault.com/a/1190000008754631
阅读全文
posted @
2018-04-16 17:31
chester·chen
阅读(88)
推荐(0) 编辑
递归-分销
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace digui { class Program { static Dictionary resulkt = new ...
阅读全文
posted @
2018-04-12 20:57
chester·chen
阅读(185)
推荐(0) 编辑
MongoDB 创建数据库
摘要:连接: mongo 192.168.6.66:27017 登录 use admin db.auth("root","82xo#FR[G^oEME[iYU%ct~~N6LC(vWwC") 创建数据库 use project_admin_db db.test.insert({"id":"1"}) 创建读写用户 db.createUser( { user:"customer", p...
阅读全文
posted @
2018-04-12 09:18
chester·chen
阅读(245)
推荐(0) 编辑
生成树状结构 - 递归
摘要:using cpf360.Common; using cpf360.ModelInfo; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace cpf360.BLL { public cla...
阅读全文
posted @
2018-04-11 10:39
chester·chen
阅读(231)
推荐(0) 编辑