Use The Native Device Clipboard In A NativeScript Angular Application

Back when I had just started to learn NativeScript I had created a tutorial for using the native device clipboard for copying and pasting.  The previous tutorial demonstrated this functionality in a vanilla JavaScript application.  In an effort to clean up any loose ends, I figured it would be a good idea to convert this tutorial into an Angular equivalent.  While nothing has really changed in the clipboard functionality, Angular is a very different animal.

We’re going to see how to copy and paste directly within an application built with Angular, TypeScript, and NativeScript.

(more…)

Build A Full Stack Movie Database With Golang, Angular, And NoSQL

With all the technologies and platforms available, it opens the door to infinite possibilities for development and further validates the need of being a full stack developer.  There are many stacks in existence, but one of my personal favorites includes Golang, Angular, and NoSQL.

So how do you apply all these stack technologies towards a fully functional application?  Let's look at a possible usage scenario before we explore the technologies.

A problem I've found myself having recently is keeping track of all my movies.  Can you believe I've purchased the same film multiple times by accident?  From this spawned my need to keep a database of every movie I purchased.  Using NoSQL, Angular, and the Go programming language, we can create such an application to keep track of what films we own and for what platforms.

Display Toast Notifications In A NativeScript Angular Application

Back when I had just started working with NativeScript, about a year ago, I wrote a tutorial for displaying Toast notifications in Android.  While still valid, it demonstrated these notifications using vanilla NativeScript and JavaScript.  Not only that, but the notifications were only for Android.  Since the framework has become significantly better, I figured it would be a good idea to demonstrate these Toast notifications in a NativeScript Angular application.

We’re going to see how to use a plugin to display Toast notifications in a NativeScript Android and iOS application built with Angular.

(more…)

Using Modal Dialogs In A NativeScript Angular Mobile Application

Recently I was prototyping an application in NativeScript with Angular, but was feeling too lazy to set up the Angular Router to do multiple page navigation.  Typically when I run into this scenario I use the prompt dialog, but this time I needed something more than data input.  This lead me to the modal dialog.

With the modal dialog I can create a popup with pretty much anything on it and when I close it I can pass data back to the parent view.  We’re going to see how to use a custom modal within our iOS and Android NativeScript application built with Angular.

(more…)

Accessing The Device Camera In A NativeScript Angular Application

More than a year ago when I started playing around with vanilla NativeScript I encountered the camera module.  Previously I had even written a tutorial on using the camera in a vanilla NativeScript application.  The NativeScript framework has come a long way and now includes Angular support so I figured it would be a good idea to see how to use the camera with this framework.

We’re going to see how to access the native device camera and take pictures within a NativeScript Android and iOS application built with Angular.

(more…)

Learning The Angular Platform As Well As NativeScript In Ng-Book 2

I’ve kept this on the down-low the past few months, but I’m pleased to announce that a chapter I’ve contributed has been included in the incredibly popular ng-book 2!

The chapter I’ve contributed is a deep dive into NativeScript development for the Angular developer.  After learning every possible thing about Angular development you get to take your skills to the next level and apply them towards the development native mobile applications for Android and iOS.

(more…)

Automatically Setting Your Profile Picture In A NativeScript Angular App

It doesn’t just take a good idea when it comes to making a great mobile application.  Sometimes it takes a little flair in the user interface department to make a good mobile application into a great mobile application.  For example, when you have a user login screen, you could just ask for username and password credentials, or you could include profile picture information as well.  Which do you think would be better?

Gravatar offers a global avatar registry based on user email address.  In other words, you upload your profile picture to Gravatar, associate it with your email address, and then that same avatar can be used in any application that uses Gravatar.  WordPress, the platform this blog is hosted on, uses Gravatar for my profile picture for example.

We’re going to see how to automatically set the user profile picture in a NativeScript Angular application using the Gravatar API.

(more…)

Communicate With Websockets In A NativeScript Angular Application

I’ve been playing around with sockets and websockets recently.  Not too long ago I wrote about creating a real-time chat application using Golang and Angular that made use of websockets.  In that example we created a chat server using the Go programming language and a client facing web application using Angular.  The communication between the two used websockets to keep things real-time.

What if we wanted to create a native mobile application for Android and iOS that communicated via websockets to our server or any other websocket server?  Using NativeScript, it is very possible to create a mobile client that works with the Golang with Angular example as seen previously.

(more…)

Internationalization In A NativeScript Mobile App With Angular

I’m an English only speaker, reader, and writer, so when I download an application from iTunes or Google Play, it is going to be in English.  There are many people like this, but possibly in a language other than English.  When I release my English-only application, how much of the world am I neglecting?  To get the most success for your application, it makes sense to add internationalization (i18n) support so users can access your application in their native language.

Back in my AngularJS days I was using an incredible library called ng-translate and lucky for me, and everyone else, there is a variation of that same library for later versions of Angular.  This new library, called ng2-translate, accomplishes the task of multiple language support in your application.

We’re going to see how to add internationalization support to our NativeScript Android and iOS application built with the Angular framework.

(more…)

Create A Real Time Chat App With Golang, Angular 2, And Websockets

I’ve been hearing a lot about websockets lately and how they can accomplish real time communication between applications and servers.  They act as a compliment and possible alternative to RESTful APIs that have been around for significantly longer.  With websockets you can do real time messaging for things like chat, communication with IoT, gaming, and a whole lot of other things that need instant communication between clients and the server.

A while back I had played around with websockets and Node.js using a library called Socket.io, but since I’ve been really getting into Golang I wanted to explore websockets using the Go programming language.

We’re going to check out how to create a chat application where the client is an Angular 2 application and the server is a Golang application.

(more…)