Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Ionic Starter App
- // angular.module is a global place for creating, registering and retrieving Angular modules
- // 'starter' is the name of this angular module example (also set in a <body> attribute in index.html)
- // the 2nd parameter is an array of 'requires'
- // 'starter.services' is found in services.js
- // 'starter.controllers' is found in controllers.js
- var app = angular.module('starter', ['ionic', 'starter.controllers', 'starter.services'])
- .run(function ($ionicPlatform) {
- $ionicPlatform.ready(function () {
- // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
- // for form inputs)
- if (window.cordova && window.cordova.plugins.Keyboard) {
- cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
- }
- if (window.StatusBar) {
- // org.apache.cordova.statusbar required
- StatusBar.styleDefault();
- }
- });
- });
- app.controller("FeedController", function ($http, $scope) {
- $scope.init = function () {
- $http.get("http://ajax.googleapis.com/ajax/services/feed/load", { params: { "v": "1.0", "q": "http://blog.nraboy.com/feed/", "num": "100" } })
- .succes(function (data) {
- $scope.rssTitle = data.responseData.feed.title;
- $scope.entries = data.responseData.feed.entries;
- window.localStorage["entries"] = JSON.stringify(data.responseData.feed.entries);
- })
- .error(function (data) {
- console.log("error" + data);
- });
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment