I am trying to get the add button to enable if I select a valid file otherwise disable it. Also i'm trying to show messages if an invalid file is selected. The code below doesn't not seem to generate the desired result: <form name="myForm"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Add Image</h4> </div> <div class="modal-body"> <!-- <table class="table table-responsive table-hover table-condensed"> --> <div class='row'> <div class="form-group"> <div class="col-sm-10"> <input type="file" class="form-control-file" ng-file-select="onFileSelect($files)" ngf-accept="'.jpg,.png'" ngf-pattern="'.jpg,.png'" ngf-max-size="'500KB'" name="img" id="img" ng-model="product.filename" required> <div ng-messages="myForm.img.$error && myForm.img.$touched" ng-show="myForm.img.$dirty" style="color:red"> <div ng-message="maxSize"><p>Image is to large, it must be smaller than 10 Mb</p></div> <!-- <div ng-message="minSize"><p>Image is …

Member Avatar
+0 forum 0

Hi guys, I'm fairly new to angularjs 2 (I've only used 2) and I have a small application with a form. Currently I'm able to get the form data as an objects and print it to the console.log, onSubmit(form: any):void{ console.log(form); } producing this: Object {author: "Author test", title: "Title test", location: "Location test", medium: "Medium test", notes: "Notes test"} but what I want to do now is to push that data to a mysql database. I have no idea what needs to be done, so I'm doing a bit of reading here and there, but I have to say …

Member Avatar
Member Avatar
+0 forum 2

Employee.php <div class="col-xs-12"> <h2>Listing Employee</h2> <hr> <div class="employeeGrid"> <table> <tr> <th><a href="" ng-click="orderByField='name'; reverseSort = !reverseSort">Name</a></th> <th><a href="" ng-click="orderByField='age'; reverseSort = !reverseSort">Age</a></th> <th><a href="" ng-click="orderByField='gender'; reverseSort = !reverseSort">Gender</a></th> <th><a href="" ng-click="orderByField='company'; reverseSort = !reverseSort">Company</a></th> <th>Action</th> </tr> <tr ng-repeat="person in employee | orderBy:orderByField:reverseSort""> <td>{{person.name}}</td> <td>{{person.age}}</td> <td>{{person.gender}}</td> <td>{{person.company}}</td> <td> <button class="btn" ng-click="viewEmployee(person.id)"><span class="glyphicon glyphicon-eye-open"></button> <button class="btn" ng-click="editEmployee(person.id)"><span class="glyphicon glyphicon-pencil"></button> <button class="btn" ng-click="deleteEmployee(person.id)"><span class="glyphicon glyphicon-trash"></button> </td> </tr> </table> </div> EmployeeController.js scope = $scope; scope.employee = []; scope.$on('$stateChangeSuccess', function () { scope.init(); }); scope.init = function(){ $http({ method: 'GET', url: '/api/v1/employee/list' }).then(function successCallback(response){ scope.employee = response.data; }); } scope.editEmployee = function(val){ empScope = $scope; …

Member Avatar
Member Avatar
+0 forum 2

The code below opens a modal window successfully. When I attempt to open the modal window after closing it, my browser window freezes. To unfreeze I press the escape button on my keyboard. Employee.php <div class="modal-footer"> <button type="button" class="btn btn-secondary" ng-click="closeEmployee()" data-dismiss="modal">Close</button> </div> EmployeeModalController.js <div class="modal-footer"> <button type="button" class="btn btn-secondary" ng-click="closeEmployee()" data-dismiss="modal">Close</button> </div> EmployeeModalController.js scope.closeEmployee = function(){ scope.$dismiss('cancel'); } EmployeeMainController.js scope.viewEmployee = function(val){ scope.theModal = $uibModal.open({ animation: false, scope: scope, templateUrl: '../assets/templates/modal/Employee.php', controller: 'EmployeeModalController', size: '', backdrop: 'static', resolve: { empId: function () { return val; } } }).result.catch(function(res) { if (!(res === 'cancel' || res === 'escape key press')) …

Member Avatar
Member Avatar
+0 forum 1

I am attempting to create a simple project for the subject matter for learning and discovery purpose however it doesn't seem to work. My rest API works well but the integration of AngularJS with Laravel doesn't work. You can pull my mini project from [Click Here](https://github.com/solomon13000/angulara). Your help is kindly appreciated.

Member Avatar
Member Avatar
+0 forum 4

hi I'm trying to run karma test runner on angular-seed project I downloaded from git with no success always I get errors, here is the repo im using this version https://github.com/angular/angular-s...16dfcf0522ecbc I installed jasmine and karma and node.js and karma-chrome-launcher I installed all this using the npm package manager that comes with nodejs , im reading a book of SitePoint called angular from novice to ninja and im stacked now on page 19 trying to run karma and launch the connected karma page on chrome by running the batch file found in scripts folder called test.bat as stated in the …

Member Avatar
Member Avatar
+0 forum 2

I have a SPA which uses an AngularJS front end and C# back end. The issue I'm having is when I navigate to the login page, it is using @Html.Partial("_LoginPartial"). The url then becomes .../Account/Login. When I click on say the "About" tab, this uses an AngularJS route which in turn instead of routing me to the About Page, it tacks on the route to the end of the login route like so: .../Account/Login#/about. Would anyone know how I would resolve this? I have spent hours looking into this issue and haven't really found anything as of yet.

Member Avatar
Member Avatar
+0 forum 1

Hi guys, I will soon have a licence to run webstorm on one machine (at work) but I need to think of some other free IDE which supports typescript ideally natively on a different laptop running windows and linux (at home). I had a look around of course, but as I don't have any experience with any of them I thought I'd ask here. For windows I know that there is visual studio core, although I'm not sure that's free. I have eclipse installed already, both on linux and on windows but I've only used it for java, never for …

Member Avatar
Member Avatar
+0 forum 2

Hi Guys, I've been playing around with Angular and Ionic tutorials and I'm attempting to put together things I've learnt from different tutorials to build a simple NPR audio player. I have a really really anoying issue with ng-show/ng-hide... Basically, in the bottom left hand corner of my application I have a play/pause button. Acutally it's 2 buttons, a play button and a pause button, they are both supposed to occupy the same space (i.e. only one of them being visible at once) so I have used ng-show and ng-hide on them. When player.paused is true, the play button is …

Member Avatar
Member Avatar
+0 forum 1

I know current page can be reload from the directive too. But, I am newbie, don't know how it can be done. Below is my directive, from where I want to reload page e.g. http://myproject/die/ap/assess.php#/reading/827/3/2378/2 .directive('popupdirective', function($log, $compile, $controller, $http, $templateCache, $rootScope){ return { restrict: 'A', scope:{popView:"@",getdata:"="}, link:function(scope,element,attr,pCtlr){ angular.element(".pop-window-close span.fa.fa-times").click(function(){ angular.element(".pop-window-wrapper").hide(); /* I want redirect from here */ });})

Member Avatar
+0 forum 0

Currently I'm using xampp, and creating chat-app with AngularJS and integrated with Laravel framework. My AngularJS front-ends is actually placed in Laravel's views folder. And the back-ends stuff (Angular's controller, services) placed in public/app folder. I try to integrate chat-app template (front-end) into my video template. So it's actually a video page and right-side will be live-chat server integrated. First I try to create a chat-room front-end embed right beside my video... The creation of chatroom (front-end) didn't works well. The button not functioning at all. There is no error in the page seen by eyes. But when I try …

Member Avatar
+0 forum 0

Dear All, (first of all I am a beginner!!!) I have a project single-page web application (php, mysql, jquery, angularjs). I have questiong regarding angularjs and php how to pass url parameter to php variable? public_profile.php?user_id=7 I know basics of angularjs routing, and it works fine. The problem is when I click on one table row, I should be taken to some kind of edit page... but I get the error saying Notice: Undefined index: user_id in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 2 Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\hrmodel\public\pages\onclick-dummy.php on line 11 can you please help …

Member Avatar
+0 forum 0

I cleaned up my code but now when I run it I am getting an error. I am not sure where it is coming from since it was working before I added the nested view and did not change the controller. Here is my [plunkr](http://plnkr.co/edit/vN06ZQYWW0cpO4izBtgT?p=info). Let me know if there is anything else you need. TypeError: f[k] is undefined angular.min.js (line 32, col 244)

Member Avatar
Member Avatar
+0 forum 1

I run the [code](http://embed.plnkr.co/C76bGd5ao07oSP4vvPj0/preview) but the template ir not doing anything at all. Is there a problem with my syntax?

Member Avatar
Member Avatar
+0 forum 2

I want to create an option that will reset my page once the user clicks on an alert the controller will reset to original form. I have the alert all set up but I am not sure how to do this. In JavaScript I created a function that did this `startANewGame();` which was this function startANewGame() { $('#startNew').click(function() { location.reload(true); $("input[type=submit]").val("Guess"); $("input[type=submit]").attr("id","guessButton"); }); // End of $('#startNew') } //End of function startANewGame() Is there a way to a function such as `reload` in AngularJS that will do this or do I need to create a function? Here is how my …

Member Avatar
+0 forum 0

$scope.works = [ { wproperties:'<span>text #1</span><span>text #2</span><span>text #2</span><span>text #3</span>' } ] <span ng-bind-html="work.wproperties"></span> span is printing as null, who can help me? controllers and ng-app working so ng-bind-html not working..

Member Avatar
Member Avatar
+0 forum 1

Hello Pals... Help with this code...I am unable to hold Angularjs tag with Php variables $vid = "{{task.vid}}"; //this where the Errors comes in :( $s = $db->query("SELECT * FROM reply WHERE post_id_fk = '$vid'") or die($db->error.__LINE__); Please how can i go about this? Thank you!

Member Avatar
Member Avatar
+0 forum 2

The End.