Pessoal estou usando o metronic com angular e tenho o controller tudo certo, porem tentei criar uma função que exibe oq o usuario digitou em um campo em um alert (futuramente irei filtrar)...
arquivo HTML :
angular.module('App').controller('UserProfileController', function($rootScope, $scope, $http, $timeout) {
$scope.$on('$viewContentLoaded', function() {
App.initAjax(); // initialize core components
Layout.setSidebarMenuActiveLink('set', $('#sidebar_menu_link_profile')); // set profile link active in sidebar menu
$scope.form.txt;
});
// set sidebar closed and body solid layout mode
$rootScope.settings.layout.pageBodySolid = true;
$rootScope.settings.layout.pageSidebarClosed = true;
$scope.Submit = function() {
alert($scope.form.txt);
}
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.min.js"></script>
<form role="form" action="#" ng-submit="Submit()">
<div class="form-group">
<label class="control-label">First Name</label>
<input type="text" ng-model="form.txt" placeholder="John" class="form-control" /> </div>
<div class="margiv-top-10">
<a input type="submit" id="submit" ngClick="Submit()" class="btn green-haze"> Save Changes </a>
</div>
</form>
Alguem sabe como arrumar ? Obg