JSFiddle - React, Tailwind, and code Playground

by badfreja

HTML

<!-- bindings in angular2 what do the following things do? -->
<div (click)="click()"></div>
<div [click]="click()"></div>
<div [(click)]="click()"></div>

JavaScript

$http( "/not-valid-url")
.then(function( data ) {
  console.log('1')
}, function(error) {
console.log('2')
}).then(function( data ) {
  console.log('A')
}, function(error) {
console.log('B')
})

// answered 2A;

// difference between link function and controller, in directive?


var a = {a: 1};
console.log(a[a]);
console.log(a.a);
console.log(a['a']);

/* controller inside another controller, what happens if you try to access a non-existant property on controller no.2? for example ctrlB.xxx ? error or undefined? * /