Angular 2: Difference between revisions

From Han Wiki
Jump to navigation Jump to search
delete initial notes
Line 26: Line 26:
An example event binding.
An example event binding.


<source lang="typescript">
<source lang="ts">
<button (click)="onSave()">Save</button>
<button (click)="onSave()">Save</button>
</source>
</source>
Line 32: Line 32:
Canonical form:
Canonical form:


<source lang="typescript">
<source lang="ts">
<button on-click="onSave()">Save</button>
<button on-click="onSave()">Save</button>
</source>
</source>


[https://developer.mozilla.org/en-US/docs/Web/Events List of events that can be used on MDN.]
[https://developer.mozilla.org/en-US/docs/Web/Events List of events that can be used on MDN.]

Revision as of 13:02, 8 July 2016

npm lite-server related

turn off connection logging

Setting logConnection to false in bs-config.json did not work. The connection is logged by a middleware called connect-logger and you can disable it by creating bs-config.js with the following content.

module.exports = {
  server: { middleware: { 0: null }}
};

turn off file change updates

Add logFileChanges line to disable logging of file change updates.

module.exports = {
  server: { middleware: { 0: null }},
  logFileChanges: false
};

Event

An example event binding.

<button (click)="onSave()">Save</button>

Canonical form:

<button on-click="onSave()">Save</button>

List of events that can be used on MDN.