1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 18:26:26 +00:00
Files
Boostnote/src/browser/main/controllers/modals/ExpandRecipeModalController.js
2015-06-24 20:39:36 +09:00

24 lines
561 B
JavaScript

/* global angular */
angular.module('codexen')
.controller('ExpandRecipeModalController', function (recipe, $modalInstance, $scope, Modal) {
var vm = this
console.log(recipe)
vm.recipe = recipe
vm.cancel = function () {
$modalInstance.dismiss('cancel')
}
vm.insert = function (type) {
$scope.$broadcast('insertRequested', type)
}
vm.insertSnippet = function () {
Modal.selectSnippet()
.then(function (snippet) {
$scope.$broadcast('insertSnippetRequested', snippet)
})
}
})