Ionic - Wordpress REST API starter

Size
2,961 Kb
Views
32,384

How do I make an ionic - wordpress rest api starter?

This is starter project for Ionic - Wordpress REST API starter. What is a ionic - wordpress rest api starter? How do you make a ionic - wordpress rest api starter? This script and codes were developed by Dzulfikar Adi Putra on 06 September 2022, Tuesday.

Ionic - Wordpress REST API starter Previews

Ionic - Wordpress REST API starter - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Ionic - Wordpress REST API starter</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/ionic/1.2.4/css/ionic.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <html ng-app="ionicApp" > <title>Starter</title> <body ng-controller="MainCtrl"> <ion-header-bar class="bar bar-positive"> <h1 class="title">Seoul State of Mind</h1> </ion-header-bar> <ion-header-bar class="bar bar-subheader bar-stable"> <h2 class="title">{{posts.length}} of {{found}} posts</h2> </ion-header-bar> <ion-content class="has-subheader has-footer"> <ion-list> <ion-item ng-repeat="post in posts" class="card item item-avatar item-text-wrap"> <img src="{{ post.attachments[0].thumbnails.thumbnail }}"> <h2>{{ post.title }}</h2> <p>{{ post.excerpt }}</p> </ion-item> </ion-list> </ion-content> <ion-footer-bar class="bar bar-footer bar-dark"> <h3 class="title" ng-click="openPage(currentPage+1)"> Load posts in page {{currentPage+1}} </h3> </ion-footer-bar> </body>
</html> <script src='http://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/ionic/1.2.4/js/ionic.bundle.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.7/leaflet.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/angular-leaflet-directive/0.10.0/angular-leaflet-directive.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Ionic - Wordpress REST API starter - Script Codes CSS Codes

body { cursor: url("https://ionicframework.com/img/finger.png"), auto;
}
.angular-leaflet-map { background: white; width: 100%; height: 100%;
}
.scroll-content { height: 100%;
}
.bg-color { background: #eaeaea;
}

Ionic - Wordpress REST API starter - Script Codes JS Codes

angular.module('ionicApp', ['ionic', 'leaflet-directive'])
.controller('MainCtrl', function($scope, $ionicLoading, $http) { $scope.currentPage = 1; $scope.found = 0; $scope.posts = []; // var bloguri = 'lakonhidup.wordpress.com'; var bloguri = 'seoulstateofmind.com'; var URL = 'https://public-api.wordpress.com/rest/v1.1/sites/'+bloguri; openPage($scope.currentPage); $scope.openPage = function(pageNumber){ openPage(pageNumber); alert('open next page'); } function openPage(pageNumber){ $ionicLoading.show(); $http.get(URL+'/posts/?fields=attachments,title,ID,excerpt&number=5&page='+(pageNumber)).then(function(response) { $scope.currentPage = pageNumber; $ionicLoading.hide(); response.data.posts = _.map(response.data.posts, function(val, key){ val.attachments = _.values(val.attachments); return val; }); response.data.posts.forEach(function(val, key){ $scope.posts.push(val); }); $scope.found = response.data.found; // For JSON responses, resp.data contains the result }, function(err) { $ionicLoading.hide(); alert('ERROR'); // err.status will contain the status code }); }
});
Ionic - Wordpress REST API starter - Script Codes
Ionic - Wordpress REST API starter - Script Codes
Home Page Home
Developer Dzulfikar Adi Putra
Username superpikar
Uploaded September 06, 2022
Rating 3
Size 2,961 Kb
Views 32,384
Do you need developer help for Ionic - Wordpress REST API starter?

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!

Dzulfikar Adi Putra (superpikar) Script Codes
Create amazing love letters with AI!

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!