I have a problem to deal with fetching the html through the ajax call. It fetches the template of the add form; but I couldn't find the form fetched from html through the ajax call. So, how can I submit the form with angularJS? Please help me!
<div class="alive" ng-controller="ListController">
    <div ng-include="templateForList"></div>
</div>
<div class="alive" ng-controller="AddController">
    <div ng-include="templateForAddition"></div>
</div>
<script type="text/javascript" src="/vendor/angular/angular.min.js"></script>
<script type="text/javascript">
    var app = angular.module('myApp', []).config(['$httpProvider', function($httpProvider) {
        $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
    }]);
    app.service('StoreService', ['$http', function ($http) {
        return {
            getAll: function () {
                return $http.get('/admin/shopping/stores/list');
            }
        };
    }]);
    app.factory('myCustomService', function($rootScope) {
        var sharedService = {};
        sharedService.broadcastEvent = function(eventName) {
            $rootScope.$broadcast(eventName);
        };
        return sharedService;
    });
    app.controller('ListController', ['$scope', 'StoreService', 'myCustomService', function($scope, StoreService, sharedService) {
        $scope.stores = {};
        $scope.templateForList = '/views/stores/list.tpl.html';
        StoreService.getAll().success(function(response) {
            $scope.stores = response.data;
        });
        $scope.showAddForm = function(store, storeEntryForm) {
            sharedService.broadcastEvent('displayAddForm');
        };
    }]);
    app.controller('AddController', ['$scope', function($scope) {
        $scope.templateForAddition = '/views/stores/add.tpl.html';
        $scope.$on('displayAddForm', function() {
            angular.forEach(document.getElementsByClassName('skate-item'), function(item) {
                var $item = angular.element(item), s = $item.scope();
                if ($scope.$id == $item.scope().$id) {
                    $item.addClass('alive');
                } else {
                    $item.removeClass('alive');
                }
            });
        });
        $scope.create = function(store) {
            console.log('submitting', $scope.storeEntryForm, $scope.store);
        };
    }]);
</script>
And the add.html is:
<form method="post" name="storeEntryForm" class="form-horizontal" data-ng-submit="create(store)" novalidate>
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
        <div class="box box-success">
            <div class="box-header"><h3 class="box-title">Create Store</h3></div><!-- /.box-header -->
            <div class="box-body clearfix">
                <div class="col-xs-12 col-sm-12 col-md-5">
                    <div class="form-group">
                        <label class="control-label">Name</label>
                        <input type="text" placeholder="Enter name of the store" class="form-control" ng-model="store.name" name="name" required ng-maxlength="50" />
                    </div>
                    <div class="form-group">
                        <label class="control-label">Address</label>
                        <textarea placeholder="Enter address" class="form-control" ng-model="store.address" name="address" ng-maxlength="100"></textarea>
                    </div>
                    <div class="form-group">
                        <label class="control-label">ISO No.</label>
                        <input type="text" class="form-control" ng-model="store.iso_no" name="iso_no" ng-maxlength="50" />
                    </div>
                </div>
            </div><!-- /.box-body -->
            <div class="box-footer text-center">
                <button type="submit" class="btn btn-primary">Save</button>
                <button type="button" class="btn btn-default" data-ng-click="cancel()">Cancel</button>
            </div>
        </div><!-- /.box -->
    </div><!-- /.bs3-col-lg-8 -->
</form>
 
     
     
    