Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8207273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:56:42+00:00 2026-06-07T08:56:42+00:00

I am working on my first AngularJS project. I love it so far, but

  • 0

I am working on my first AngularJS project. I love it so far, but I’m hung up now.

My project is structured so that I’ve got a single ng-view in my index.html that is populated with a separate HTML template/partial based on the current route.

In one of the partials I’d like to use the jQuery DateFormat plugin to format a SQLite datetime string that is parsed into the template/partial using an angular expression:

{{ find.addDate }}

I’ve included the plugin with a script tag in index.html and I thought from there it would be as simple as doing something like this in my template/partial:

{{ $.format.date(find.addDate, "dd/MM/yyyy") }}

Or maybe:

{{ angular.element.format.date(find.addDate, "dd/MM/yyyy") }}

That’s not working (I’m sure it’s obvious why to some of you), but there’s no error in the console and I’m pretty stumped on how to approach it. I’ve done some Googling with terms like ‘third party scripts in angular’ or ‘jquery plugin angularjs’, etc. but can’t find recent code examples on how to accomplish this the right way.

I did find some older code using angular.widget, but it appears that’s been deprecated in the 1.0+ releases. I think I need to use a directive, but I can’t figure it out exactly.

I’m really hoping for an explanation or simple example please. Thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:56:45+00:00Added an answer on June 7, 2026 at 8:56 am

    The problem is when you do {{expression}} in a template, it evaluates it on the current scope.

    For example, if you have this controller:

    function MyCtrl($scope) {
        $scope.find = {
            addDate: 2030
        };
    }
    

    {{find.addDate}} would in reality look for $scope.find.addDate and evaluate it (in this case returning 2030).

    So when you try to do {{ $.format.date(find.addDate, "dd/MM/yyyy") }}, angular looks for $scope.$.format.date(find.addDate, "dd/MM/yyyy"), which doesn’t exist.

    Try something like this instead, using a function in your controller:

       function MyCtrl($scope) {
            $scope.find = {
                addDate: 2030
            };
            $scope.formatDate = function(input, format) {
                return $.format.date(input, format);
            }
        }
    

    And then you can do in your html you can do: {{formatDate(find.addDate, "dd/MM/yyyy")}}.

    You could also evaluate it as a filter in your markup, since it just takes an input and changes it: {{find.addDate | formatDate:"dd/MM/yyyy"}}

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Meteor.js for a new project. It was working at first, but now
I working on my first ASP.net MVC project and and i got some problems
Working on my first Rails project, I used Ryan Bates' Nifty-Generators to create the
i am working on my first Ajax Project and i cannot find a solution
I'm, currently working my first project in .NET 4.0 and it requires several thousand
I'm writing a macro, but because I'm working for first time in vb, I
I have pretty much finished my first working Symbian application, but in my hastened
I am using following code snippet, but its not working :-( //First four characters
I am new to wpf and i am working on first application i have
For some weird reason, the codes below are first working, then website is redirecting

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.