I’m trying to add Push to my application but its throwing Ionic is not defined

ReferenceError: Ionic is not defined
var push = new Ionic.Push({

Everything is working fine except this undefined error, I’ve run this command to update lib but nothing happen, bundle version is * Ionic, v1.1.0

ionic lib update

My app.js

angular.module('TestApp', ['ionic','ionic.service.core',
.run(function($ionicPlatform,$rootScope,$location,$timeout,$anchorScroll,$state,$ionicHistory,$cordovaPush) {

    $ionicPlatform.ready(function() {

        var push = new Ionic.Push({
          "debug": true

        push.register(function(token) {
          console.log("Device token:",token.token);


In following the setup steps, Ionic CLI autowrote to my index.html:

<script src="lib/ionic-platform-web-client/dist/"></script>

but I had to manually retrieve the source file ( from:

and put it in the expected directory:


I also had to disable and then re-enable limited pushes from the CLI:

ionic config set dev_push true