AngularJS ng-controller not working

前端 未结 8 1430
日久生厌
日久生厌 2020-12-09 16:30

I just now started learning on AngularJS from w3schools. I am trying to practice examples what ever they have mentioned in the tutorials. Every thing works fine but when i c

8条回答
  •  星月不相逢
    2020-12-09 17:14

    You have to input function as a parameter inside module

    var app = angular.module('app',[]);
    app.controller('personController',function($scope){
      $scope.firstName = 'John';
      $scope.lastName = 'Smith';
    });
    

提交回复
热议问题