Eliézer
Eliézer
Store the editor from onLoad in $scope. ```javascript $scope.aceLoaded = function($editor) { $scope.$editor = $editor; }; $scope.onOpen = function(code, fileExtension) { let mode = resolveExtension(fileExtension); $scope.html = code; $scope.$editor.session.setMode('ace/mode/' +...
Sorry I forgot add the service ```javascript $scope.openFile = function(file) { //Here I prefer use factory. //fileFactory.openFile(file).then(fn,fn); $http.post('/api', file).then(function (res) { $scope.onOpen( res.data.content, res.data.extension) },angular.noop); } ```
Use ngModel for it. ```javascript $scope.aceLoaded = function($editor) { $scope.$editor = $editor; }; $scope.onOpen = function(code, fileExtension) { let mode = resolveExtension(fileExtension); $scope.html = code; $scope.$editor.session.setMode('ace/mode/' + mode); } ```
**All inputs** needs a directive to define a mask. Example the calendar with [mask](https://www.primefaces.org/showcase/ui/input/calendar.xhtml)
I found my mistake, I use **to**, where must be **as**. **WRONG** ```cpp JsonArray arr = config->doc.to(); ``` **CORRECT** ```cpp JsonArray arr = config->doc.as(); ```
Lack a trigger onHide,... Into $modal.hide, we can add the trigger, and use the options to set the callback.
In my case I need a trigger to block the aside close. Something like: onHiding = function() { //false not hide return value === 'rule'; }
Thanks, works for me too. Example blocking aside: $scope.$on('aside.hide.before', function (e) { if (block_aside_close) e.preventDefault(); }
angular-strap is **simple**, with **small doc**, and angular-ui is **more complete** with a **too big doc**. Last commits angular-strap is on **20 Feb 2017** (by **1** contributor) angular-ui **30 Jan...
Try this: **service.js** ```javascript (function () { var app = angular.module('services', ['modal-controllers']); var mymodalservice= function ($modal, $q, $factory) { let self = this; self.$modal = {}; self.$modal.detailOS = function (year,...