Question: I noticed it's possible to property bind stuff without brackets. What is the difference?

Typescript:

```
import { Component, Input } from '@angular/core';

@Component( {
    selector: 'my-comp',
    templateUrl: `
    input is {{foo}}
  `

})
export class myComponent {
    @Input() public foo: string;

    constructor() { }
    }

```

HTML:

**Case 1**

```
<my-comp [foo]="bar"></my-comp>

```

**Case 2**

```
<my-comp foo="bar"></my-comp>

```

Answer: 
Here is brief description of all situation:

When you use square brackets, the right hand side is an expression. When you use no brackets at all, the right hand side is a constant.

So will assign 'constant' string to my-tag's input. To achieve the same effect with square brackets: notice the single quote inside. If you didn't put single quote there, my-tag's input will be tied to its parent component's (where you write this template) property or template variable (like ngFor's let-constant for example) named "constant".

form here [What is the difference between property binding and just a regular attribute](https://www.reddit.com/r/Angular2/comments/5u1h1b/what_is_the_difference_between_property_binding/)
There is a small, maybe unimportant situation, but in some cases it can be annoying that you miss it.

Number
------

---

**Case 1**

```
<my-comp [foo]="90"></my-comp>

```

**Case 2**

```
<my-comp foo="90"></my-comp>

```

**Case 1:** `typeof foo => 'number'`

**Case 2:** `typeof foo => 'string'`

Boolean
-------

---

**Case 3**

```
<my-comp [foo]="true"></my-comp>

```

**Case 4**

```
<my-comp foo="true"></my-comp>

```

**Case 3:** `typeof foo => 'boolean'`

**Case 4:** `typeof foo => 'string'`