Skip to main content
added 30 characters in body
Source Link
softvar
  • 18.6k
  • 13
  • 58
  • 77

You must to injectinject your controller into application module.

Give to your app a name:

<html ng-app='myApp'>

Inject controller:

var app = angular.module('myApp', []);
app.controller('SimpleController', function($scope) {
    $scope.customers = [
        { name:'John Doe',city : 'Pheonix'},
        { name : 'John Smith',city: 'New York'},
        { name : 'Jane Doe',city : 'San Fransisco'}
    ];
}

You must to inject your controller into application module.

Give to your app name:

<html ng-app='myApp'>

Inject controller:

var app = angular.module('myApp', []);
app.controller('SimpleController', function($scope) {
$scope.customers = [
{ name:'John Doe',city : 'Pheonix'},
{ name : 'John Smith',city: 'New York'},
{ name : 'Jane Doe',city : 'San Fransisco'}
];
}

You must inject your controller into application module.

Give your app a name:

<html ng-app='myApp'>

Inject controller:

var app = angular.module('myApp', []);
app.controller('SimpleController', function($scope) {
    $scope.customers = [
        { name:'John Doe',city : 'Pheonix'},
        { name : 'John Smith',city: 'New York'},
        { name : 'Jane Doe',city : 'San Fransisco'}
    ];
}
Source Link
freethinker
  • 2.4k
  • 4
  • 28
  • 56

You must to inject your controller into application module.

Give to your app name:

<html ng-app='myApp'>

Inject controller:

var app = angular.module('myApp', []);
app.controller('SimpleController', function($scope) {
$scope.customers = [
{ name:'John Doe',city : 'Pheonix'},
{ name : 'John Smith',city: 'New York'},
{ name : 'Jane Doe',city : 'San Fransisco'}
];
}