Учусь делать приложения на symfony2 и angular . Столкнулся с ошибкой не пойму в чем дело подскажите.
app.js
'use strict';
var adminApp = angular.module('adminApp', ['ngRoute','adminControllers'])
.config(['$routeProvider','$locationProvider','$httpProvider',
function($routeProvider,$locationProvider,$httpProvider){
$httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
$locationProvider.html5Mode({
enabled: true,
requireBase: false
});
$routeProvider.when('/app_dev.php/admin/add-page', {
templateUrl: '/app_dev.php/admin/add-page',
controller: 'AddPageCtrl'
});
$routeProvider.when('/app_dev.php/admin/login', {
templateUrl: '/app_dev.php/admin/login',
controller: 'LoginCtrl'
});
}
]);
контроллер :
'use strict';
var adminControllers = angular.module('adminControllers',[]);
adminApp.controller('AddPageCtrl',['$scope', '$http', '$route', '$location', '$templateCache' ,
function($scope, $http,$route,$location, $templateCache){
$scope.addPage = function(){
console.log($scope);
};
}]);
форма:
<form class="form add-page" name="addPage" novalidate="novalidate" method="post" {{ form_enctype(form) }}>
<div id="pages">
<div>
<label for="pages_title" class="required">Название страници</label>
<input type="text" id="pages_title" name="pages[title]" required="required" class="form-control" ng-model="pages.title">
</div>
<div>
<label for="pages_category_page" class="required">Категория страници(для выподающего меню)</label>
<input type="number" id="pages_category_page" name="pages[category_page]" required="required" maxlength="10" class="form-control" value="0" ng-model="pages.category_page">
</div>
<div>
<label for="pages_smallDescription" class="required">Краткое описание</label>
<textarea id="pages_smallDescription" name="pages[smallDescription]" required="required" class="form-control" ng-model="pages.smallDescription"></textarea>
</div>
<div>
<label for="pages_description" class="required">Полное описание</label>
<textarea id="pages_description" name="pages[description]" required="required" class="form-control" ng-model="pages.description"></textarea>
</div>
<input type="hidden" id="pages__token" name="pages[_token]" value="xxxxxxxxxxxxxxxxxxx"></div>
<div class="form-group">
<br>
<input type="submit" class="btn btn-default" ng-click="addPage(pages,addPage)" value="Добавить">
</div>
</form>
при ng-click выдает вот такую ошибку
prntscr.com/7d0uh2