import {Origin} from 'aurelia-metadata';
import {JadeView} from './jade';

/**
Retrieves a `.jade`-type view via usual convention used by `ConventionView`. 

@class JadeConventionView
@extends JadeView
@param viewModel {Object} ViewModel to determine viewUrl by convention from
@param [isCompiled] {Boolean} If true, will not attempt to use SystemJS plugin loader (i.e. no '!' suffix)
@param [extension] {String} Custom extension used for your views (defaults to `.jade.js` for compiled, `jade` for non-compiled)
**/
export default class JadeConventionView extends JadeView {
	constructor(viewModel, isCompiled) {
		this.moduleId = Origin.get(viewModel.constructor).moduleId;

		return super(
			JadeConventionView.convertModuleIdToViewUrl(this.moduleId),
			isCompiled
		);
	}

	/**
	Converts a given module ID into the conventional view URL

	@static
	@method convertModuleIdToViewUrl
	@param moduleId {String} Module ID to convert
	**/
	static convertModuleIdToViewUrl(moduleId, isCompiled) {
		return moduleId + '.jade';
	}
}
import {Origin} from 'aurelia-metadata';
import JadeView from './jade';

/**
Retrieves a `.jade`-type view via usual convention used by `ConventionView`. 

@class JadeConventionView
@extends JadeView
@param viewModel {Object} ViewModel to determine viewUrl by convention from
@param [isCompiled] {Boolean} If true, will not attempt to use SystemJS plugin loader (i.e. no '!' suffix)
@param [extension] {String} Custom extension used for your views (defaults to `.jade.js` for compiled, `jade` for non-compiled)
**/
export default class JadeConventionView extends JadeView {
	constructor(viewModel, isCompiled) {
		this.moduleId = Origin.get(viewModel.constructor).moduleId;

		return super(
			JadeConventionView.convertModuleIdToViewUrl(this.moduleId),
			isCompiled
		);
	}

	/**
	Converts a given module ID into the conventional view URL

	@static
	@method convertModuleIdToViewUrl
	@param moduleId {String} Module ID to convert
	**/
	static convertModuleIdToViewUrl(moduleId, isCompiled) {
		return moduleId + '.jade';
	}
}
Fix problem with convention import
Fix problem with convention import
