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 8830555
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:07:15+00:00 2026-06-14T08:07:15+00:00

How to execute Angular Expressions values in Directives values in Angular Js. {{user.name}} is

  • 0

How to execute Angular Expressions values in Directives values in Angular Js.
{{user.name}} is work. But when I use it in Directive ( ng-init ), It wont work.

ng-init="formData.id='{{user.name}}'"

Or any other way?

  • 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-14T08:07:16+00:00Added an answer on June 14, 2026 at 8:07 am

    The ngInit directive as the name suggest, does initialization tasks, for example if you want to set an user’s name and age data, you can do the following:

    <div ng-init="user.name='John'; user.age=50">
    

    This is executed before angular starts bootstrapping your app and compiling templates. Expressions surrounded by double curly braces {{ }} are bindings that tell angular to evaluate an expression and produce output, so if you want to display data previously initialized just add them to your document like this:

    <body ng-app>
        <div ng-init="user.name='John'; user.age=50">
          {{user.name}} is {{user.age}} years old.
        </div>
    </body>
    

    ​
    Check the very basic example here: http://jsfiddle.net/j9Nfd/

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

Sidebar

Related Questions

I thought that :folddoc execute v:foldstart.p would work, but it only repeatedly returns the
I need to execute a directory copy upon a user action, but the directories
I execute some tests within my application, but before doing that I have to
I execute the command below to revoke a user's permissions to execute a particular
I execute the ftp.exe cmd through a C# System.Diagnostics.Process type. And I use the
I execute an INSERT INTO statement cursor.execute(INSERT INTO mytable(height) VALUES(%s),(height)) and I want to
I execute following code on windows xp and python 2.6.4 But it show IOError.
c.execute(DELETE FROM data WHERE user = %s AND machine = %s , (user, machine))
When execute svn update whent in repository there are any changes it gets next
When i execute /mycontroller/search it shows only /mycontroller but how do i get /mycontroller/search

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.