Skip to main content

Posts

Showing posts from October, 2016

Sneak Peek at Ionic Framework Tools and Patterns

Easily Send Text Messages from a Mobile App with Ionic Framework
Note: This is a brief sample of my Pluralsight Course, Ionic Framework Tools and Patterns. The text below is a rough transcript of the video shown here.

http://ionicframework.com/docs/v2/native/sms/

Every mobile phone knows how to send a text message. We can leverage that ability in our Ionic app by using the sms plugin. In the last section, we created a menu item to send a message to a student’s parent, but all it did was show a popup saying the message was sent. We can complete that functionality by wiring that up to the plugin now.

First, let’s not forget to install the plugin:
gulp --cordova "plugin add cordova-sms-plugin --save"

Next we’ll update the Roster controller to let the user enter the message to be sent. We’ll repurpose the $ionicpopup, and just change the show function to prompt, like so...

    function sendMessageToParent(student) {
      $ionicPopup.prompt({
        title: 'Message Parent',