4
Ng-include kullanırken kapsamı kaybetme
Bu modül yolları var: var mainModule = angular.module('lpConnect', []). config(['$routeProvider', function ($routeProvider) { $routeProvider. when('/home', {template:'views/home.html', controller:HomeCtrl}). when('/admin', {template:'views/admin.html', controller:AdminCtrl}). otherwise({redirectTo:'/connect'}); }]); Ev HTML'si: <div ng-include src="views.partial1"></div> partial1 HTML: <form ng-submit="addLine()"> <input type="text" ng-model="lineText" size="30" placeholder="Type your message here"> </form> HomeCtrl: function HomeCtrl($scope, $location, $window, $http, Common) { ... $scope.views …