You need to reference $scope.todos (todos) in your view. As it stands, your
template only references undefined scope values (todo)
On Fri, Jan 3, 2014 at 7:17 PM, Steven Brooks brooks.stev...@gmail.comwrote:
I am trying to show the index action of a rails app with an angular
front-end.
Hi Steven,
What's the API response? If it is root wrapped, that might explain it.
--
chrisrhoden, from my telephone
On Jan 4, 2014 12:36 PM, Steven Brooks brooks.stev...@gmail.com wrote:
Sander,
When I run the following code in the browser:
Todo.query( function(x) {console.log(x);
I see that you have set the container position to absolute. What you really
want to do is set the element with the ngShow directive to
position:absolute.
On Mon, Jan 13, 2014 at 4:54 PM, Srikar Shastry srikar.sas...@gmail.comwrote:
I'm creating a form in angularjs in which there are two ngShow
UTC-6, Chris Rhoden wrote:
I'm having a hard time understanding what you're trying to accomplish.
Can you explain what you're expecting to happen here?
On Fri, Jan 24, 2014 at 10:36 AM, Brad McAlister brad.mc...@gmail.comwrote:
I'm having trouble showing the current view in my html
$scope.characters = [{name:'fred'}];
p{{characters.name}}, World/p
$scope.characters is an array, not an object. Try {{characters[0].name}}
On Fri, Jan 24, 2014 at 5:07 PM, Philip philsiv...@googlemail.com wrote:
Hi
Newbie!
Been trying for days to get controller to work.
My set up is
I am having a hard time understanding what you're looking to do.
Your mycontrol directive is way too complicated. Try this instead.
http://jsfiddle.net/JYeq9/
On Thu, Feb 6, 2014 at 10:49 AM, Sander Elias sanderel...@gmail.com wrote:
Hi,
have a loko at this: http://jsfiddle.net/rc7uC/3/
in isolate scope definitions.
Try writing this without ever using $parent or ng-init. Those are
definitely smells. If you're still confused, let me know.
On Thu, Feb 6, 2014 at 10:56 AM, Chris Rhoden carho...@gmail.com wrote:
I am having a hard time understanding what you're looking to do.
Your
You could bind to the service from your directive.
mod.directive('myDirective', ['myService', function (myService) {
return {
restrict: 'A',
...
};
});
This is usually not necessary, though, and probably means that the
directive is doing too much if it's absolutely necessary.
Marc,
Controllers are not services in Angular.js, they are distinct. If you
really need to construct a new controller, you can use the $controller
service (which can be injected where you are trying to inject the
controller currently). I suspect that you're misunderstanding what you
should be
at 1:37 PM, Yonatan Kra kra.yona...@gmail.com wrote:
Hi. Thanks. I'm an almost total newbie... could you explain please (or
refer me to an example) how to use ng-model? I tried to use it in mt
partial but it kept ignoring the service value.
On Feb 6, 2014 7:22 PM, Chris Rhoden carho...@gmail.com
, February 6, 2014 4:10:11 PM UTC, Chris Rhoden wrote:
http://jsfiddle.net/UYbL9/
This really lays bare that this directive is just a wrapper for input
ng-model. You should consider the ng-namespace reserved and not for your
use, so I have changed it to my-model. If you're going to add additional
If you want to use shared state or functionality, you should use a service
instead of a controller. You'll probably want to use the module.factory()
method.
I'm not sure what functionality you're talking about using in other parts
of the application. If you're talking about i.e. pulling out the
If you want to access things in scope with your directives, you can't use
an isolate scope.
You should probably not be accessing the outer scope directly.
You can use the sigil for your isolate scope declaration which will allow
you to pass a callable expression as an attribute to your
Look into the reloadOnSearch option for your route definitions.
http://docs.angularjs.org/api/ngRoute.$routeProvider
On Fri, Feb 14, 2014 at 2:27 AM, Jake K. jykl...@gmail.com wrote:
Hello,
I am using a 'slider' in my page and I want to allow the user to
go to the previous 'slide' using
The 0 isn't necessary, and using $timeout to defer some action isn't an
antipattern, but the rest of your message concerns me. If you're
communicating between controllers using $scope, you're doing it wrong. Make
a service if two controllers need to share state.
On Thu, May 1, 2014 at 4:04 PM,
Also, here's a hint. It isn't saying that defer is undefined, it's saying
that you're trying to read the `defer` property of undefined.
On Thu, May 15, 2014 at 11:51 AM, Chris Rhoden carho...@gmail.com wrote:
You aren't injecting $q, because your injection annotation does not
include
, Chris Rhoden wrote:
You aren't injecting $q, because your injection annotation does not
include it.
On Thu, May 15, 2014 at 11:46 AM, Chris squirr...@gmail.com wrote:
hi all,
i'm new to angularjs, trying to use $q in a controller with no luck.
any ideas?
thanks
TypeError: Cannot
Is there a reason you can't use the $location service with html5 mode
enabled?
On Thu, Jun 12, 2014 at 6:21 AM, hyperN nikola.mrati...@gmail.com wrote:
I have problem using HTML 5 History API with Angular:
Error: [$rootScope:infdig] 10 $digest() iterations reached.
Aborting!Watchers
to rewrite my routing and use Angular's, so this is solution
is more convenient for me (as I plan to use this on only one page on my
website)
On Thursday, June 12, 2014 2:27:19 PM UTC+2, Chris Rhoden wrote:
Is there a reason you can't use the $location service with html5 mode
enabled?
On Thu, Jun
:)
set up a route which matched all requests - on my server side or in
Angular ?
On Thursday, June 12, 2014 2:46:06 PM UTC+2, Chris Rhoden wrote:
I think I may be confused – when you say that you are using server-side
routing, does that mean you want to trigger a new request to the server
add this to your resolves:
authorized: ['auth_payload', '$q', function (auth_payload, $q) {
return auth_payload.then(function (pl) {
if (/* payload is valid */) {
return true;
} else {
return $q.reject(not authorized);
}
})]
This will cause the route change to fail if
I suspect you're referring to the thumb not appearing in the correct place
when the min and max are changed. If I had to guess, that's the result of
the sequence in which things happen:
1) The input element is created, with the range 0-100.
2) Angular sees the ng-model tag, and sets the value to
Lots of directives trigger the creation of a new child scope.
On Thu, Jul 24, 2014 at 3:55 PM, Tobiah t...@tobiah.org wrote:
I just have one controller and a brief HTML page.
I attached a select to a variable using ng-model.
It wasn't updating in the controller, and I read
about always
The solution I put in place was to have my ng-app directive point at a new
module (say, modulename.base) which enables HTML5 mode and depends on the
module my ng-app directive previously depended on. This way, HTML5 mode is
only activated when in the context of my HTML page, and is not enabled in
https://docs.angularjs.org/api/ng/directive/ngCloak
On Thu, Sep 11, 2014 at 10:45 AM, Christian Nwamba
nwambachrist...@gmail.com wrote:
Hi
When i ever i initiate my angular app, it looks ugly for half a second
before displaying the real thing.
By ugly i mean it displays the raw html first,
The only possibility I can see is that Whatever.query() is resolving to an
empty array. There's nothing else that would introduce an empty array.
Try changing Whatever.query() to
Whatever.query().then (result) -
$log.debug result
result
On Tue, Oct 7, 2014 at 3:23 AM, Anton Trapp
If you want a framework with persistence built in, use meteor.
Angular is for building rich client applications, and has literally nothing
to say about the server.
On Tue, Oct 21, 2014 at 9:37 AM, António Ramos ramstei...@gmail.com wrote:
Hello i read some pro/cons about these 2 but i´m
27 matches
Mail list logo