Skip to content

Instantly share code, notes, and snippets.

View AFelipeTrujillo's full-sized avatar

Andrés Felipe Trujillo AFelipeTrujillo

View GitHub Profile
var defered = $q.defer();
var promise = defered.promise;
defered.resolve({"success":"true","data":[{"id":603,"assistanceDate":"2016-07-27 14:41:20","salesRoom":"ESTACI\u00f3N DE BUS","totalAffiliated":1,"assistanceTime":"2016-07-27 02:40:05","affiliatedId":12343,"affiliatedFirstName":"SLASH","affiliatedLastName":"ROSE","afiliatedMaritalStatus":"SOLTERO","num_rows":355},{"id":602,"assistanceDate":"2016-07-27 14:36:52","salesRoom":"HELIPUERTO","totalAffiliated":1,"assistanceTime":"2016-08-30 07:13:57","affiliatedId":8000,"affiliatedFirstName":"JON BON","affiliatedLastName":"JOVI","afiliatedMaritalStatus":"DIVORCIADO","num_rows":355},{"id":601,"assistanceDate":"2016-07-27 14:33:35","salesRoom":"HELIPUERTO","totalAffiliated":1,"assistanceTime":"2016-07-26 02:32:12","affiliatedId":8000,"affiliatedFirstName":"JON BON","affiliatedLastName":"JOVI","afiliatedMaritalStatus":"DIVORCIADO","num_rows":355},{"id":600,"assistanceDate":"2016-07-27 14:15:08","salesRoom":"AEROPUERTO","totalAffiliated":1,"assistanceTime":"2016-0
.redClass{
color = yellow;
font-size = 0.2em;
}
<html>
<head>
<title> Import example of sass</title>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<h1>Ejemplo Simple de SASS</h1>
<h3>Bienvenidos</h3>
</body>
mainApp.controller('groceriesStoreController', function($scope) {
$scope.sugar = {};
$scope.sugar.name = "Sugar";
$scope.sugar.stock = 10;
$scope.pasta = {};
$scope.pasta.name = "Pasta";
$scope.pasta.stock = 35;
});
<div ng-app="app" ng-controller="controller">
<p>
Default Value: {{value}}
</p>
<p>
is {{number}} Even Number? {{result}}
</p>
<p>
{{sum}} {{pi}}
</p>
app.constant('PI',3.1416);
app.config(function($provide){
$provide.provider('otherService',function(PI){
this.$get = function(){
var factory = {};
factory.add = function(a,b){
return a + b;
}
app.config(function($provide){
$provide.provider('otherService',function(){
this.$get = function(){
var factory = {};
factory.add = function(a,b){
return a + b;
}
return factory;
}
app.controller('controller',function($scope,defaultValue,calcService){
$scope.value = defaultValue;
$scope.number = 14;
$scope.result = calcService.isEven($scope.number);
});
app.factory('mathFactory',function(){
var factory = {};
factory.mod = function(a,b){
return a % b;
}
return factory;
});
<div ng-app="app" ng-controller="controller">
<p>
Default Value: {{value}}
</p>
</div>