Ejemplo n.º 1
0
 asts.forEach(ast => {
   var astResult = ast.visit(visitor, context);
   if (isPresent(astResult)) {
     result.push(astResult);
   }
 });
Ejemplo n.º 2
0
 binding => isPresent(binding.expression) ? binding.expression.source : null);
Ejemplo n.º 3
0
export function composeAsyncValidators(
    validators: /* Array<Validator|Function> */ any[]): AsyncValidatorFn {
  return isPresent(validators) ? Validators.composeAsync(validators.map(normalizeAsyncValidator)) :
                                 null;
}
Ejemplo n.º 4
0
 addChild(child: DebugNode) {
   if (isPresent(child)) {
     this.childNodes.push(child);
     child.parent = this;
   }
 }
Ejemplo n.º 5
0
export function buildNodeProviders(providers?: Array<any>): Array<any> {
  return [
    ...NODE_PROVIDERS,
    ...(isPresent(providers) ? providers : [])
  ];
}
Ejemplo n.º 6
0
 set ngForOf(value: any) {
   this._ngForOf = value;
   if (isBlank(this._differ) && isPresent(value)) {
     this._differ = this._iterableDiffers.find(value).create(this._cdr);
   }
 }
Ejemplo n.º 7
0
 ngDoCheck() {
   if (isPresent(this._differ)) {
     var changes = this._differ.diff(this._ngForOf);
     if (isPresent(changes)) this._applyChanges(changes);
   }
 }
Ejemplo n.º 8
0
function _resolveView(viewRef) {
  return isPresent(viewRef) ? viewRef.delegate : null;
}
Ejemplo n.º 9
0
function _resolveProtoView(protoViewRef) {
  return isPresent(protoViewRef) ? protoViewRef.delegate : null;
}
Ejemplo n.º 10
0
 constructor(lexer: Lexer, providedReflector: Reflector = null) {
   this._lexer = lexer;
   this._reflector = isPresent(providedReflector) ? providedReflector : reflector;
 }