import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
name: 'multi'
})
export class MultiPipe implements PipeTransform { transform(value: any, args?: any): any {
if (args == null) {
args = ;
}
return value * args;
} }
<div>我的生日{{birth | date | uppercase}}</div>
<div>我的生日{{birth | date :'yyyy-MM-dd'}}</div>
<div>我的生日{{numberA | number :'2.1-4'}}</div> <div>我的生日{{numberA | multi :}}</div>
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-bind',
templateUrl: './bind.component.html',
styleUrls: ['./bind.component.css']
})
export class BindComponent implements OnInit { private birth: Date; private numberA: number; constructor() { } ngOnInit() {
this.birth = new Date();
this.numberA = 3.1514926;
}
}

最新文章

  1. Kibana+Logstash+Elasticsearch 日志查询系统
  2. [Leetcode] Course Schedule
  3. HttpContextBase转换成HttpContext对象
  4. Mac 以太网连接 报无效的服务器地址 BasicIPv6ValidationError
  5. fork和exec一起使用
  6. HDU4945 2048(dp)
  7. linux下关于gz和bz2压缩格式的常用操作技巧
  8. 用Java编写你自己的简单HTTP服务器
  9. MySQL双主配置
  10. When to use DataContract and DataMember attributes?
  11. html5 canvas 画hello ketty
  12. C++ Builder中splitter控件的使用方法简介
  13. Java知识总结
  14. node.js平台下,利用cookie实现记住密码登陆(Express+Ejs+Mysql)
  15. iframe跨域动态设置主窗口宽高
  16. TJU ACM-ICPC Online Judge—1191 The Worm Turns
  17. EF开发中EntityFramework在web.config中的配置问题
  18. python+appium 自动化2--元素定位uiautomatorviewer
  19. Testlink1.9.17使用方法(第九章 测试结果分析)
  20. ORA-1652: unable to extend temp segment by 128 in tablespace xxx Troubleshootin

热门文章

  1. git 本地文件里内容 操作记录
  2. java的错误代码。。。。
  3. PL/SQL 训练06--字符串处理
  4. mysql核心参数优化
  5. 22 mysql有那些”饮鸩止渴”提高性能的方法?
  6. Invalid byte tag in constant pool: 19
  7. sysfs文件系统
  8. 基本的Ceph性能测试工具和方法
  9. python并发之multiprocessing
  10. 服务器实现处理GET和POST