Angular js Curly braces doesnt show value in html

Hi I have tried numerous articles and answers from different questions but no luck, I am using a blank ionic project and it runs on my browser with ionic.serve also there isn't any errors showing.

The {{truck}} is shown in my application rather than the value "Truck Value" and also the {{truck}} does not permanently appear it blinks as soon as I refresh the browser.

html
 <body ng-app="starter">
    <div ng-controller="Ctrl">
        <h2>hey {{truck}}</h2>
     </div>
</body>

js

var example = angular.module('starter', ['ionic', 'ngCordova'])
...
example.controller("Ctrl", function() {

      var truck = "Truck Value";                               

    });

example.controller("Ctrl", function($scope) {

      $scope.truck = "Truck Value";                               

    });

you need to pass $scope as a parameter like this

example.controller("Ctrl", function($scope) { ... }

and assign your data to scope inside this function like this

$scope.truck = "Truck Value";

Pass $scope as a parameter and then try:

var example = angular.module('starter', ['ionic', 'ngCordova'])
...
example.controller("Ctrl", function($script) {

      $scope.truck = "Truck Value";                               

    });

example.controller("Ctrl", function($scope) {

  $scope.truck = "Truck Value";                               

});

Use vm rather than $scope in future release of angular it will be removed as per many discussion so make a practice of vm rather than $scope

    (function () {
        'use strict';
    var example = angular.module('starter', ['ionic', 'ngCordova'])
        var controllerId = 'Ctrl';

    example.controller(controllerId,[Ctrl]);

        function Ctrl() {

            var vm = this;
            vm.truck="Truck Value";
          }
    })();

in html


 <body ng-app="starter">
    <div ng-controller="Ctrl">
        <h2>hey {{vm.truck}}</h2>
     </div>
</body>