i'm trying to learn angular.js, specifically some try on the ng-if directives when i find this error in the console:
Angular js SyntaxError: expected expression, got '.' .controller('trovoilnome',function($scope){
i have assigned two controllers on the same module:
angular.module('direttive',[])
//per ng bind
.controller('addizione', ['$scope',function($scope){
$scope.example = {
numerouno: 12,
numerodue: 7
};
}]);
//per ng if
.controller('trovoilnome',function($scope){
$scope.nome = {
nome: 'Gigi',
cognome: 'latrottola'
};
});
somebody should tell me what i have done wrong?