Search Posts

using messageformat with angular-translate

I’ve got a rails 4.1/angular 1.x app that I’ve got angular-translate-rails gem happily running on. I’m wanting to integrate pluralisation as per angular-translate-interpolation-messageformat and I’m not entirely sure I’m doing this right! I’ve got messageformat.js v0.1.7 and angular-translate-interpolation-messageformat.js loaded (I got them from this this plunkr ) I’ve got Māori language currently switched on (mi-std) and I’m getting the error Plural Function not found for locale: mi-std. I’m aware that mi-std isn’t the correct locale […]

Angularjs WebApi is not working in MVC Entity Framework

This error is Occur after running the web application. this is picture of inspect elements of google chrome. See Image See Second Image i want to us entity framework here is class code… when i comment the public virtual List tblproduct { get; set; } and public virtual List tblproduct { get; set; } this its working perfetcly how to completety use entity framework mvc in it [Table(“tblCatagory”)] public class AddCatagory { public int Id […]

AngularJS tooltip directive not closing on iPhone 6

I’m trying to solve a bug on a tooltip directive written in AngularJS. We are creating a tooltip using a nested HTML already declared in the DOM, the directive is below. The tooltip works fine on desktop with the tooltip showing on mouse enter and hiding on mouse leave, but on an iPhone 6, the user cannot dismiss the tooltip. Desired behaviour would be to allow the user to click elsewhere on the page in […]

$event object inside $http.get AngularJS

I am currently doing a web application with AngularJS and a consumable API using SlimPHP. When I register a user, I need to perform a check using a GET method. Depending on this method returns, I should run the $event.preventDefault() or not. The code of AngularJS is the following: $scope.checkEmails = function(e){ var req = $http.get(url + ‘adv/register/check?email=’ + ${ if( === true) { e.preventDefault() } }) } And the HTML button is this: <button […]

Cordova app not redirecting to login page

I have an cordova-angular app. When i run it, its not redirecting to login page. I have got all things set up, i guess. Like I installed angular, cli , node and all, i think i will be needing. My index.html code is: <html> <head> <script src=”cordova.js”></script> <!– Required Polyfills –> <script src=”vendor/es6-shim/es6-shim.min.js”></script> <script src=”vendor/systemjs/dist/system-polyfills.js”></script> <script src=”vendor/angular2/bundles/angular2-polyfills.min.js”></script> <script src=”vendor/intl/dist/Intl.min.js”></script> <script src=”vendor/intl/locale-data/jsonp/en.js”></script> <script src=”vendor/systemjs/dist/system.js”></script> <script src=”vendor/rxjs/bundles/Rx.min.js”></script> <script src=”vendor/angular2/bundles/angular2.js”></script> <script src=”vendor/angular2/bundles/router.min.js”></script> <script src=”vendor/angular2/bundles/http.min.js”></script> <script src=”vendor/fastclick/lib/fastclick.js”></script> <script> var […]

how to change value of input in ionic 3

I’m new in ionic and I need some help. I have a page that has a form, and I’m receiving a parameter from another page to be injected into the form. Now I was able to change the value of the input, but when I submit the form the value always comes undefined. ts code export class QpayPage { private qpay_form: FormGroup; id; merchant_id; constructor(public navParams: NavParams, private iab: InAppBrowser, public nav: NavController, private formBuilder: […]

Separate the topics object with start and end date in day wise format in javascript

A module has certain topics which has start and end dates. These topics are to be split day wise, meaning, which all topics will be covererd in same day. A topic can be completed in a single day, in multiple days or multiple topics can be covered in single day too. Below is a sample data. What will be the best algorithm to display that which all topics will be covered day wise. For sample […]

Angular- ng-show/hide within ng-repeat

I have seen similar questions related to this but this is different. In most of the questions, ng-hide/show fired on ng-click event. Here is the code. $scope.showDetails = 0; $scope.delete = function(event) { alert(; $scope.showDetails = 1; There would be more code for delete function. Some Ajax calls will be here. } <div ng-repeat=”suggestions1 in suggestions”> <div class=”col-xs-12 alert alert-info” ng-if=”showDetails == ‘0’”> <center> <a ng-click=”delete($event)” id={{}} class = “btn btn-danger”> <font size = “4”> […]

Error when email fails in angular with mandrill

Hi am a bit new to coding, I have successfully managed to send emails from my app. Am struggling to do certain functions upon sending the email successfully. For instance, if mailgun successfully send an email I would like to implement $state.go(‘’); in my controller but if email fails to send I would like to send users to an error page for example $state.go(‘’); . Here is a block of my controllers.js CheckoutService.sendMail(toAddress, strMessage, “Order […]

UI-router dynamic `abstract` property

Well I am trying to set the ui-router’s abstract property to true dynamically, so that I can avoid unauthorized access by the user to that route. I could only think of that way to achieve that goal. Here’s the demo route. .state(‘project’, { abstract: {{value}}, url: ‘/users’, templateUrl: ‘views/configuration/index.html’, }, I want that once the angular app loads, all such routes becomes abstract-true whose access should be denied to the user. Please help me out […]

Next Page »