{% verbatim %}
{{ variabileAngularjs }}
{% endverbatim %}
Soluzioni sconsigliate
function myController($http, $scope) {
... code ...
}
myApp.controller('myController', [
'$http', '$scope', function($http, $scope) {
... code ...
}]
myApp.config([
'$routeProvider', '$locationProvider', function($routeProvider, $locationProvider) {
return $routeProvider.when('/form', {
templateUrl: '/custom/templates/myform.html',
controller: 'myApp.FormController'
}).otherwise({
redirectTo: 'form'
});
}
]);
href="javascript:void(0)"
FOSJsRoutingBundle
CypressAngularNgRouting Bundle
“A Symfony2 bundle to expose your routing in Angular.js resource format”
var url = NgRouting.generateResourceUrl('api_get_documents');
// url now is something like: /app_dev.php/documents
JMSTranslationBundle
“puts the Symfony Translation Component on steroids.”
BazingaJsTranslationBundle
Translator.trans('chiave')
Translator.trans(‘key’, { “foo” : “bar” }, ‘DOMAIN_NAME’);
// sostituirà ogni “%foo%” con “bar”.
Translator.transChoice('key', 1, {}, 'DOMAIN_NAME');