Nuovo per angularjs. Vuoi scrivere un'espressione in un ng-clic.Usa avviso da ng-clic di una direttiva
esempio:
x.directive('li',function(){
return {
restrict: 'E',
replace: true,
template: '<games> <game ng-click="(alert({{ game }})" ng-repeat="game in games"> {{ game.team1 }} {{game.bets }} <game></br></games> '
}
});
Voglio avvisare il gioco su clic, ma ho ottenuto questo errore:
Error: [$parse:syntax] Syntax Error: Token 'game' is unexpected, expecting [:] at column 11 of the expression [(alert({{ game }})] starting at [game }})].
prova ng clic = "console.log (gioco)" – harishr
non ha funzionato @HarishR –