Angular 2 allows you to pass values from inputs simply by referencing them in the template and passing them into your Subject.next() call. This lesson shows you how to make a number input and pass the value so you can configure how much you want the…
The components inside of your container components can easily accept Observables. You simply define your custom @Input then use the Async pipe when you pass the Observable in. This lesson walks you through the process of passing an Observable into a…
MyBatis's mapped statements have the parameterType attribute to specify the type of input parameter. If we want to pass multiple input parameters to a mapped statement, we can put all the input parameters in a HashMap and pass it to that mapped state…
@Input allows you to pass data into your controller and templates through html and defining custom properties. This allows you to easily reuse components, such as item renderers, and have them display different values for each instance of the rendere…
Component: import { Component, Input, ChangeDetectionStrategy, EventEmitter, Output } from '@angular/core'; @Component({ selector: 'stock-counter', changeDetection: ChangeDetectionStrategy.OnPush, template: ` <div class="stock-counter"> &l…
Angular 2 templates have a special let syntax that allows you to define and pass a context when they’re being generated. import {Component, ViewChild, ViewContainerRef, ComponentFactoryResolver, ViewChild} from '@angular/core'; import {SimpleService}…
Besides @Input(), we can also use properties on the @Component, to pass the data. import {Component, View, NgFor, Input} from 'angular2/angular2'; @Component({ selector: 'reddit-article' }) @View({ directives: [], template: ` <article> <div class…
While you have multiple streams flowing into your scan operator, you'll need to map each stream to the specific values you need to update your state the way that you want. This lesson covers using the map operator to determine what the click and inte…
需求:在angular ui-grid列表中添加一个日期组件来修改时间. 在angular ui-grid添加了一个html5 date input,后端返回的数据是YYYY-MM-DD,比如:2018-06-21 { displayName: '起飞时间', name: '起飞时间', cellTemplate: '<div ng-hide="row.entity.isShowSave">{{row.entity.airwayBillCheckTime}}</div…
input元素的ng-model属性: 用于将input的值和变量的值进行双向绑定 <!DOCTYPE html> <html ng-app> <head> <title>2.3.1input数据绑定</title> <meta charset="utf-8"> <script src="../angular.js"></script> <script src=&q…