A Pen by aaron k saunders
How do I make an a pen by aaron k saunders?
Forked from Daniel Lopez Mesa's Pen ramLKN.. What is a a pen by aaron k saunders? How do you make a a pen by aaron k saunders? This script and codes were developed by Aaron K Saunders on 25 September 2022, Sunday.
A Pen by aaron k saunders - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by aaron k saunders</title>
</head>
<body> <html ng-app="ionicApp"> <head> <meta charset="utf-8"> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <title>Non cached view using dynamic ng-repeat</title> <link href="//code.ionicframework.com/nightly/css/ionic.css" rel="stylesheet"> <script src="//code.ionicframework.com/nightly/js/ionic.bundle.js"></script> <script src="https://code.angularjs.org/1.2.9/angular-resource.js"></script> </head> <body> <ion-nav-bar class="bar-positive"> <ion-nav-back-button class="button-icon ion-arrow-left-c"> </ion-nav-back-button> </ion-nav-bar> <ion-nav-view></ion-nav-view> <script id="templates/menu.html" type="text/ng-template"> <ion-side-menus enable-menu-with-back-views="false"> <ion-side-menu-content> <ion-nav-bar class="bar-stable"> <ion-nav-back-button></ion-nav-back-button> <ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-navicon" menu-toggle="left"> </button> </ion-nav-buttons> </ion-nav-bar> <ion-nav-view name="menuContent"></ion-nav-view> </ion-side-menu-content> <ion-side-menu side="left"> <ion-content scroll="false" class="sidebar-bg"> <ion-list > <ion-item nav-clear menu-close class="item item-icon-left" href="#/app/browse"> <i class="icon ion-gear-a"></i>Browse </ion-item> </ion-list> </ion-content> </ion-side-menu> </ion-side-menus> </script> <script id="templates/browse.html" type="text/ng-template"> <ion-view view-title="Quedadas"> <ion-content class="has-header"> <ion-list> <ion-item ng-repeat="activeqdd in activeqdds" class="list card" style="padding-right: 0px;"> <div class="item item-avatar" ng-click="verqdd({{activeqdd.idquedada}})"> <h2 class="royal">{{activeqdd.sport}}</h2> <h2><i class="icon ion-clock"> </i>{{activeqdd.fecha}}</h2> <h3 class="positive">{{activeqdd.lugar}}</h3> <p class="subdued">Creado por {{activeqdd.name}}</p> </div> </ion-item> </ion-list> </ion-content> </ion-view> </script> <script id="templates/detail.html" type="text/ng-template"> <ion-view view-title="Detail"> <ion-content class="has-header"> <div class="list card"> <div class="item item-avatar"> <h3 class="positive">{{qdd.sport}}</h3> <h2><i class="icon ion-clock"> </i>{{qdd.fecha}} {{qdd.hora}}</h2> <h2 class="calm">{{qdd.lugar}}</h2> </div> <div class="item item-body"> <div ng-if = "qdd.descripcion != 'none'"> <h3>Descripcion</h3> <p>{{qdd.descripcion}}</p> </div> <p><a href="#" class="subdued">Creado por {{qdd.name}}</a></p> <div class="item item-divider">Asistentes</div> <ion-list ng-controller="UsersQddCtrl"> <ion-item ng-repeat="userinvited in usersinvited" class="item item-avatar"> <h2>{{userinvited.name}}</h2> <div ng-switch on={{userinvited.status}}> <h4 ng-switch-when="5" class="royal">Creador {{userinvited.date_updated}}</h4> <h4 ng-switch-when="0" class="energized">Pendiente, añadido el {{userinvited.date_updated}}</h4> <h4 ng-switch-when="1" class="balanced">Confirmado el {{userinvited.date_updated}}</h4> <h4 ng-switch-when="2" class="assertive">No asistirá {{userinvited.date_updated}}</h4> </div> </ion-item> </ion-list> <p> <a href="#" class="subdued">Asistirán {{qdd.users_left}} / {{qdd.maxusers}}</a> <a href="#" class="subdued">5 Comentarios</a> </p> </div> <div class="item tabs tabs-secondary tabs-icon-left"> <a ng-if = "qdd.iduser != loggeduser.id" class="tab-item" ng-controller = "UsersQddCtrl" ng-click="adduser({{qdd}})"> <i class="calm icon ion-thumbsup"></i> ¡Me apunto! </a> <a class="tab-item" href="#"> <i class="calm icon ion-chatbox"></i> Comentar </a> <a class="tab-item" ng-click="shareAnywhere()"> <i class="calm icon ion-share"></i> Compartir </a> </div> </div> </ion-content> </ion-view> </script> </body>
</html> <script src="js/index.js"></script>
</body>
</html>
A Pen by aaron k saunders - Script Codes JS Codes
angular.module('ionicApp', ['ionic','ngResource'])
.config(function($stateProvider, $urlRouterProvider) { $stateProvider .state('app', { url: '/app', abstract: true, templateUrl: 'templates/menu.html' }) .state('app.browse', { url: '/browse', cache : true, views: { 'menuContent': { templateUrl: 'templates/browse.html', controller: 'BrowseCtrl' } } }) .state('app.detail', { url: '/detail/:id', views: { 'menuContent': { templateUrl: 'templates/detail.html', controller: 'QddCtrl' } } }); $urlRouterProvider.otherwise('/app/browse');
})
.controller('BrowseCtrl', function($ionicLoading,$location,$scope,$filter, $state, myService) { // update view information $scope.$on( "$ionicView.enter", function( scopes, states ) { $scope.init(); }); // called when item is clicked, we pass the id of the clicked // element in as the stateParam so the detail page can get the // selected item. $scope.verqdd = function($activeqdd){ console.log("$scope.verqdd " + $activeqdd); $state.go('app.detail', { id: $activeqdd }); } // $scope.init = function(){ $ionicLoading.show({ template: 'Loading...' }); $scope.getActiveQdd().then(function(res){ //Success $scope.activeqdds = res.result; $ionicLoading.hide(); }, function(status){ //Err $scope.pageError = status; }) } // $scope.getActiveQdd = function(){ var $iduser = 1; var $fecha_actual = $filter('date')(new Date(), 'yyyy-MM-dd'); var $hora_actual = $filter('date')(new Date(), 'HH:mm'); var $hora = $hora_actual.replace(':', '-'); return myService.query({ iduser:$iduser, fecha_actual : $fecha_actual, hora:$hora }); } $scope.init();
})
.controller('QddCtrl', function($scope, myService, $stateParams) { myService.get($stateParams.id).then(function(_data){ $scope.qdd = _data.result[0]; console.log('Players to Qdd: ', $scope.qdd); }, function(_error){ alert("error " + _error); })
})
.controller('UsersQddCtrl', function($scope, $http, $q,myService) { $scope.init = function(){ $scope.getUsersQdd() .then(function(res){ //Success console.log('UsersQddCtrl: ', res); $scope.usersinvited = res.result; }, function(status){ //Err $scope.pageError = status; }) } $scope.getUsersQdd = function(){ var defer = $q.defer(); var $qddsel = myService.get(); console.log('myserviceqdd: ', $qddsel); $http.jsonp('http://quedadas.magentadesigncorporation.com/quedadas/getUsersQdd/idquedada/' + $qddsel.idquedada + '/format/json?callback=JSON_CALLBACK') .success(function(res){ defer.resolve(res) }) .error(function(status, err){ defer.reject(status) }) return defer.promise; } //$scope.init();
})
.factory('myService', function($resource) { var savedData = {} function set(data) { savedData = data; } // // function _get(_id) { console.log("_get(_id) " + _id); var baseUrl = 'http://quedadas.magentadesigncorporation.com/quedadas/getUsersQdd/idquedada/:id/format/json'; var itemResource = $resource(baseUrl, { id: _id , callback: "JSON_CALLBACK" },{ get : { method :"JSONP" } }); var item = itemResource.get(); item.$promise.then(function (data) { // do something with the data console.log(data); return data; }, function(_error){ console.log(_error) }); return item.$promise; } /** */ function _query(_options) { var baseUrl = 'http://quedadas.magentadesigncorporation.com/quedadas/getActiveQdd/iduser/' + ':id/fecha_actual/:fecha/hora/:hora/format/json'; var productsResource = $resource(baseUrl, { id: _options.iduser , fecha: _options.fecha_actual, hora: _options.hora, callback: "JSON_CALLBACK" },{ query : { method :"JSONP", isArray : false } }); var products = productsResource.query(); products.$promise.then(function (data) { // do something with the data console.log(data); return data; }, function(_error){ console.log(_error) }); return products.$promise; } return { set: set, get: _get, query : _query }
});
Developer | Aaron K Saunders |
Username | aaronksaunders |
Uploaded | September 25, 2022 |
Rating | 3 |
Size | 4,143 Kb |
Views | 28,336 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Proper way to manage ng-options selections | 2,114 Kb |
Ionic 2 Tabs Starter | 3,059 Kb |
Google Map Directive in Ionic | 3,479 Kb |
Demo ui-router basic state change | 2,042 Kb |
Firebase Login Example | 2,682 Kb |
Angular2 Http Example | 3,851 Kb |
A Pen by aaron k saunders | 2,916 Kb |
Promise sample for Cross-Platform mobile application class | 2,214 Kb |
Nested ng-repeat in AngularJS with Checkboxes | 2,600 Kb |
Using ui-router to control application flow | 3,448 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
SVG email test v2.0 | M_J_Robbins | 2,090 Kb |
A Bouncy Menu Toggle | Billyysea | 4,563 Kb |
Lecture 1 | Law | 0 Kb |
JS Countdown Timer | Ayoungh | 2,435 Kb |
CSS eye follow | Pedrocampos | 2,592 Kb |
Svg penguin | _massimo | 2,990 Kb |
Drag and Drop Quiz | Cgspicer | 3,837 Kb |
Flexbox playground | Enxaneta | 5,418 Kb |
Christ the Redeemer | Prashantsani | 2,208 Kb |
Factorial | KeithleySLHS | 1,158 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!