Angular 2

From Han Wiki
Revision as of 13:02, 8 July 2016 by Mhan (talk | contribs) (→‎Event)

Jump to navigation Jump to search

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.