Please tell me about error of the Guide 5


I am a first time user to start the ionic

So we got a big problem in the first place.

We have a problem like the one shown below.

Please tell me about solution.

Append 1. Index.html

    <!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width">

    <link href="lib/ionic/css/ionic.css" rel="stylesheet">
    <link href="css/style.css" rel="stylesheet">

    <!-- IF using Sass (run gulp sass first), then uncomment below and remove the CSS includes above
    <link href="css/" rel="stylesheet">

    <!-- ionic/angularjs js -->
    <script src="lib/ionic/js/ionic.bundle.js"></script>

    <!-- cordova script (this will be a 404 during development) -->
    <script src="cordova.js"></script>

    <!-- your app's js -->
    <script src="js/app.js"></script>
  <body ng-app="todo" ng-controller="TodoCtrl">
    <!-- Center content -->
      <ion-header-bar class="bar-dark">
        <h1 class="title">Todo</h1>
        <!-- our list and list items -->
          <ion-item ng-repeat="task in tasks">
      <!-- Left menu -->
      <ion-side-menu side="left">
        <ion-header-bar class="bar-dark">
          <h1 class="title">Projects</h1>

Append 2. app.js

// 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'
angular.module('todo', ['ionic'])

controller('TodoCtrl', function($scope) {
  $scope.tasks = [
    { title: 'Collect coins' },
    { title: 'Eat mushrooms' },
    { title: 'Get high enough to grab the flag' },
    { title: 'Find the Princess' }

.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) {
    if(window.StatusBar) {

Thank you

Hi friend, welcome to the most amazing framework in the world :smiley:

You have two errors in your app.js file :

  • you forgot the “.” before “controller(‘TodoCtrl’” in order to link it to the module.
  • you set a “;” after the controller and before “.run”, preventing it to be linked to the module as well. Take the “;” off.

It’s working :smile:

Thnak you for your relpy.

Your reply was very helpful.

So I was successfully executed.