src/angular-model.js
function(object) {
      if (object instanceof ModelClass) {
        return object.url();
      }
      if (object instanceof ModelInstance || isFunc(object.$model)) {
        var model = object.$model();
        return expr(object, model.$config().identity + '.href').get() || model.url();
      }
      throw new Error('Could not get URL for ' + typeof object);
    }
function(object) {
      if (object instanceof ModelClass) {
        return object.url();
      }
      if (object instanceof ModelInstance || isFunc(object.$model)) {
        var model = object.$model();
        return expr(object, model.$config().identity + '.href').get() || model.url();
      }
      throw new Error('Could not get URL for ' + typeof object);
    }
function ( object ) { if ( object instanceof ModelClass ) { return object . url ( ) ; } if ( object instanceof ModelInstance || isFunc ( object . $model ) ) { var model = object . $model ( ) ; return expr ( object , model . $config ( ) . identity + '.href' ) . get ( ) || model . url ( ) ; } throw new Error ( 'Could not get URL for ' + typeof object ) ; }
Extract URL from object, or use default URL
Extract URL from object or use default URL