This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-hide="$ctrl.showUploadPicture" class="row form-group"> | |
<div class="col-xs-12"> | |
<div ng-show="$ctrl.currentPicture"> | |
<img ng-src="{{$ctrl.currentPicture}}" alt="{{$ctrl.course.name}}"/> | |
</div> | |
<br/> | |
<br/> | |
<a ng-hide="$ctrl.showUploadPicture" ng-click="$ctrl.showUploadPicture = true"> | |
<span class="fa fa-cloud-upload"></span> | |
<span>Subir imagen</span> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
router.post('/:id/picture', | |
global.app.data.buckets({ | |
bucket: 'pip-recreational-centers', | |
nameSuffix: req => '_' + req.params.id + '.png' | |
}), | |
(req, res, next) => model.RecreationalCenter.findById(req.params.id).then( | |
recreationCenter => { | |
recreationCenter.picture = req.resource.Location; | |
return playlist.save(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div ng-repeat="alert in $ctrl.alerts"> | |
<div>{{alert.message}}</div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_.reduce(req.body.labels, | |
(promise, requestLabel) => promise.then( | |
() => { | |
var label = new model.Label(requestLabel); | |
label.branch = DISTRIBUTION_BRANCH_ID; | |
return labelsService.createLabel(label); | |
} | |
), | |
Promise.resolve() | |
).then( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body ng-app="app"> | |
<main ui-view></main> | |
<script src="angular/angular.min.js"></script> | |
<script src="angular-ui-router/release/angular-ui-router.min.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var async = require('async'), | |
nodemailer = require('nodemailer'), | |
_ = require('lodash'), | |
model = app.model, | |
hash = app.security.hash, | |
validate = app.validation.validate; | |
/** | |
* the mobile api should validate a token session from the mobile app | |
* @param router |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$scope.addProviders = function() { | |
$scope.report.filters.providers = $scope.report.filters.providers.concat($scope.providersToAdd); | |
angular.forEach($scope.providersToAdd, function(provider) { | |
$scope.providers.remove(provider); | |
}); | |
$scope.providersToAdd = []; | |
}; | |
$scope.removeProviders = function(){ | |
$scope.providers = $scope.providers.concat($scope.providersToDelete); | |
angular.forEach($scope.providersToDelete, function(provider) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Directives</title> | |
<script src="bootstrap.css"></script> | |
<script src="bootstrap-theme.css"></script> | |
</head> | |
<body ng-controller="defaultCtrl"> | |
<div class="panel panel-default"> | |
<div class="panel-heading"> | |
<h3>Products</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.module('exampleApp', []) | |
.controller('defaultCtrl', function ($scope) { | |
$scope.products = [ | |
{name: 'Apples', category: 'Fruit', price: 1.20}, | |
{name: 'Bananas', category: 'Fruit', price: 2.40}, | |
{name: 'Pears', category: 'Fruit', price: 2} | |
]; | |
$scope.incrementPrices = function () { | |
for (var i = 0; i < $scope.products.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('exampleApp') | |
.directive('unorderedList', function () { | |
return function (scope, element, attrs) { | |
var data = scope[attrs['unorderedList']]; | |
var propertyExpression = attrs['listProperty']; | |
if (!angular.isArray(data)) | |
return; | |
var listElem = angular.element('<ul>'); |