Code Monkey home page Code Monkey logo

Comments (7)

SimeonC avatar SimeonC commented on May 27, 2024

Hi! That's a good suggestion.
Currently you can set up text-angular as you've said, due to the fact that we needed the name to work with angular's ng-form modules. BUT it doesn't create an actual input field as you've mentioned. I'll look into adding this into the 1.1.2 version that's in pre-release currently. For now you can achieve this by the following:

<text-angular ng-model="mymodel" name="hello" />
<input type="hidden" name="hello" ng-model="mymodel">

P.S. I've edited your issue description to add the backticks around your HTML code so it shows up.

from textangular.

SamVerschueren avatar SamVerschueren commented on May 27, 2024

I can't get it to work actually. So first I added the text-angular component

<text-angular ng-model="mymodel" />

In my controller I subscribed to changes of the model like this

$scope.$watch('mymodel', function() {
    console.log($scope.mymodel);
});

But actually nothing happens. If I try to do this with a normal input field it works. But not with the text-angular component. Am I missing something? I use AngularJS 1.2.0 rc2.

from textangular.

SimeonC avatar SimeonC commented on May 27, 2024

Huh, by all accounts that should work!! I may not get back to a PC to have a good look into this before Monday, but things to try:

Use angular 1.2.2 (it's a stable release now)
Try use the textAngular 1.1.2-alpha build as I've done some work on the bindings to fix other issues.
If it's still not working is it possible for you to set up a jsfiddle/codepen/plunkr demo to reproduce it to help me get onto the right area when I'm able to please?

Thanks,
~Simeon

Sent from my iPhone

On 6/12/2013, at 9:28 pm, "Sam Verschueren" <[email protected]mailto:[email protected]> wrote:

I can't get it to work actually. So first I added the text-angular component

In my controller I subscribed to changes of the model like this

$scope.$watch('mymodel', function() {
console.log($scope.mymodel);
});

But actually nothing happens. If I try to do this with a normal input field it works. But not with the text-angular component. Am I missing something? I use AngularJS 1.2.0 rc2.

Reply to this email directly or view it on GitHubhttps://github.com//issues/43#issuecomment-29971481.

from textangular.

SamVerschueren avatar SamVerschueren commented on May 27, 2024

Here is the fiddle

http://jsfiddle.net/ZgEZr/30/

from textangular.

SimeonC avatar SimeonC commented on May 27, 2024

Hi, Have a look at this one: http://jsfiddle.net/ZgEZr/31/
It's using the stable version of AngularJS, and current stable version of textAngular (1.1.1).

It looks like you got confused between the docs for 1.1.x+ and the 1.0.x version of textAngular.

from textangular.

SimeonC avatar SimeonC commented on May 27, 2024

Oops, shouldn't edit late at night! Original issue isn't fixed yet, just the problem mentioned after.

from textangular.

SimeonC avatar SimeonC commented on May 27, 2024

This is fixed as of v1.1.2-pre2.

from textangular.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.