background preloader

Taff domotique

Facebook Twitter

Content Type Problem · Issue #116 · mgonto/restangular. Ionic: Using Factories and Web Services for Dynamic Data. AngularJS to Read XML Web Service. These AngularJS 1.0 tutorials are outdated and are here only to serve as reference for legacy applications.

AngularJS to Read XML Web Service

Angular 2.0 has been released, and you should learn that instead. In this example, we will show you how to use AngularJS to read XML web service from Yahoo weather forcast API for Honolulu Hawaii linked here. The URL was constructed from using the woeid of 2423945 for Honolulu Hawaii. woeid was determined from If we view source of the XML link we are trying to read, it looks like this ... In particular, the particular piece of data we want to extract is "temp" the temperature in Farenheit. How to set headers in Angular $http - When inquiring a remote endpoint, from a javascript application, you are usually performing an http call (GET, POST...) to access specific services, such as getting a content list, login to a protected area or storing a text message just written.

How to set headers in Angular $http -

The headers of a HTTP call are critical to the correct interpretation of the call. For example, the header may contain the authentication data, needed to the client to be authenticated and accepted by server. $http headers, a native tool of AngularJS to inquiry remote endpoints via HTTP protocol, may be set to a global level, i.e. they are inherited by all methods (GET, POST, DELETE, PUT, PATCH), or may be inherited by a single method. Setting an header. Angular and XML? No Problem! – rabidGadfly. The Finished Product JSON is a native object to AngularJS so working solely with JSON examples is easy.

Angular and XML? No Problem! – rabidGadfly

In the real world, however, you’ll probably need to deal with other types of data sources, like XML. Before I get too wordy, let’s start with what you’re really here for…the example: The Explanation While the finished product looks like the result of 15 minutes of coding, I have to admit that it took me significantly longer to figure out. Bridging the Language Gap Angular likes JSON, and can you blame it? How to handle XML services in AngularJS? Comment utiliser les services $resource avec AngularJS. Comme je ne vous l’ai jamais dit, j’ai commencé à apprendre à utiliser AngularJS pour faire des applications Web.

Comment utiliser les services $resource avec AngularJS

Et c’est pas mal du tout. J’apprécie particulièrement le fait de construire les vues (la partie HTML) en … HTML, ou presque. Et construire une application Web en HTML ce n’est pas aussi courant que cela puisse paraître. Enfin bref, voilà ce que j’ai appris à propos de la communication entre AngularJS et un serveur REST, en utilisant les services $resource. AngularJS ? Voyons ce qu’est AngularJS, comme il s’agit de mon premier article sur le sujet. AngularJS est un framework JavaScript développé par Google, qui offre, comme son nom l’indique un cadre pour travailler avec JavaScript et produire des applications Web (voire des sites Web). How to Improve Your REST Calls in Angular With ngResource. Ionic rest. Angularjs - How to update ng-repeat values in angular js?

JavaScript Timing Events. Handling CORS issues in Ionic. If you’ve used ionic serve or ionic run with live reload and accessing external API endpoints, chances are you’ve run into some CORS issues.

Handling CORS issues in Ionic

They usually look something like this: XMLHttpRequest cannot load No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' is therefore not allowed access. So what is CORS, and why is it a problem? What is CORS? CORS = Cross origin resource sharing. The origin is the host you are currently viewing. Say we send an AJAX request to your host origin will be specified by the Origin header that is automatically included for CORS requests by the browser. If we get the error above, then we may not access the resource from the server. Let’s take a look what your origin will be when you’re running your app via ionic serve, ionic run, or ionic run -l. Running in the browser. Ionic - Using Local Notifications › Justin James. Time to Read: 9 mins When you are creating a mobile applications there are times where you need to notify users about something such as an upcoming appointment.

Ionic - Using Local Notifications › Justin James

If the application is running and the user is using it in the foreground, this is easy to accomplish. However, if the application is running in the background this can be a challenging task. You could do push notifications but that takes a decent amount of work to setup with both iOS and Android app stores. If all you need to do is alert them on their local device you can just use the cordova local notification plugin and skip the headache of setting up push notifications. In this post we will walk you through creating an ionic application that uses the ngCordova local notification plugin. Environment Setup Before we get started, we need to make sure that you have your development environment configured with either an emulator or physical device as the local notification only works on a device and not a web browser.

Android: iOS: Getting started with MQTT. In this post, we will take a look at a communication protocol named Message Queue Telemetry Transport a.k.a.

Getting started with MQTT

MQTT. MQTT is a lightweight, secure, battery friendly and a machine-to-machine (M2M)/”Internet of Things” connectivity protocol. Andy Stanford-Clark and Arlen Nipper from Cirrus Link Solutions authored the first version of the protocol in 1999. What is MQTT? MQTT (formerly Message Queue Telemetry Transport) is a publish-subscribe based “light weight” messaging protocol for use on top of the TCP/IP protocol. Real world applications Facebook Messenger : Facebook has used aspects of MQTT in Facebook Messenger. Understanding OSI Model. Home.Pi Reloaded - Home Automation with Ionic and MQTT. 24/09/14 by Dennis Schulte 5 Comments Today I want to inform you about a new release of my home automation solution “Home.Pi”.

Home.Pi Reloaded - Home Automation with Ionic and MQTT

First I want to apologize to all those whom I have not yet replied to their questions after the first post. Maybe the following article answers some of them and helps you to get it running on your own hardware or cloud service. In the meantime I experimented a lot with different technologies, e.g.