JavaScript Loopback Strongloop get ModelName from model instance

Using loopback I need to get the modelName from a model instance. Any Ideas?

var myAccount = new app.models.Account({name: 'ACME'});
var modelName = myAccount.modelName;`
//should get 'Account'
Answer:1

I managed to retrieve the model name by using (where this is the model):

this.definition.name;
Answer:2

I've got some GeoJson loading into an openlayers 3 vector layer var countriesLayer = new ol.layer.Vector({ source: new ol.source.Vector({ url: '/data/countriesandstates.geojson', format: ...

I've got some GeoJson loading into an openlayers 3 vector layer var countriesLayer = new ol.layer.Vector({ source: new ol.source.Vector({ url: '/data/countriesandstates.geojson', format: ...

  1. features geojson
  2. features geojson format
  3. features geojson polygon
  4. openlayers add features from geojson

When there is 10+ series in a Scatter plot for examples - Legend look really bad.. It just extends to bottom of the screen - crossing chart area etc. What it would be nice is to have a drop-down list ...

When there is 10+ series in a Scatter plot for examples - Legend look really bad.. It just extends to bottom of the screen - crossing chart area etc. What it would be nice is to have a drop-down list ...

Whenever I run the script it returns NaN for audio duration. Script var mytrack = document.getElementById('mytrack'); var duration1 = document.getElementById('fullDuration'); duration1.innerHTML = ...

Whenever I run the script it returns NaN for audio duration. Script var mytrack = document.getElementById('mytrack'); var duration1 = document.getElementById('fullDuration'); duration1.innerHTML = ...

  1. audio duration returns nan

I'm building an Angular directive which allows the user to enter a North American phone number in a variety of common formats (such as "1(301) 797-1483" or "301.797.1483"), but stores it internally as ...

I'm building an Angular directive which allows the user to enter a North American phone number in a variety of common formats (such as "1(301) 797-1483" or "301.797.1483"), but stores it internally as ...