Sha256: 66a6249a2ccd371beceb1a15d98b83df53e062ca1f1577df02adff549a8005bc
Contents?: true
Size: 1.06 KB
Versions: 22
Compression:
Stored size: 1.06 KB
Contents
!(angular => { 'use strict'; class ResultsController { constructor(AlertFlash) { this._alertFlash = AlertFlash; this._hostname = angular.copy(location.host); } runQuery() { this.resultRunner.run(); } generateResultLink(result) { return this._hostname + '/results/query/' + this.query.item.id + '/query_version/' + this.query.item.version.id + '/result/' + result.item.id; } alertCopied() { this._alertFlash.emitSuccess('Result link copied to clipboard!'); } } ResultsController.$inject = ['AlertFlash']; function resultsComponent() { return { restrict: 'E', scope: { 'query': '=', 'results': '=', 'resultRunner': '=' }, templateUrl: 'results', controller: 'ResultsController', controllerAs: 'resultsCtrl', bindToController: true }; } angular .module('alephDirectives.results', ['alephServices']) .controller('ResultsController', ResultsController) .directive('results', resultsComponent); }(angular));
Version data entries
22 entries across 11 versions & 1 rubygems