Nope, I wasn't meaning the closing bracket.
I meant the missing function (s) part!
But I'm glad you figured it out!
Regards
Sander
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it,
I need to close this Angular bootstrap modal whenever the user selects a
row in a table:
var modalInstance = $modal.open({
templateUrl : 'test.html',
controller : TestController,
resolve: {
items: function () {
return items;
}
} });
I attempt to close the modal
Any time you use for in you will get every property including prototype
methods and properties of an object (arrays are still objects). To avoid
this, use hasOwnProperty:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty
for (var item in
They are called promises.
http://docs.angularjs.org/api/ng/service/$q
On Thursday, March 27, 2014 4:33:56 AM UTC-6, Deeksha Sharma wrote:
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails
I agree with Antonio. You are going to shoot yourself in the foot putting
everything on $rootScope even though it will seem easier to start.
Services are the way to go, period. It took me awhile to realize what
Antonio and others are saying: your model should be in your services not on
the
Actually, I've had similar issues. In my case, if your 404 page also loads
a template that still requests the same ng-include reference, then it gets
stuck in a loop and will crash the browser. It's not necessarily the fault
of angular but it would be nice if the ng-include directive knew
I agree with ev, that your problem is that you are creating a new scope
for each button. Using the Controller As syntax should help with scoping.
Ev, maybe you could be a little more tactful in your replies? Some
questions are simple enough to not require plnkrs and being an open forum
Hey,
So i was playing around with it all and the issue I'm having now is that I
don't have access to the scope in the same way I believe.
watchExpression = [ctrl.$name, attrs.name, '$invalid'].join('.')
$scope.$parent.$watch watchExpression, (value) -
$scope.isError = value
I had that
Hi Matjaz
I prefer the plunkr with the more expressive HTML, i.e.
div ng-repeat=item in items
div custom-text=item.text class=item/div
/div
... since the intent is clearer whjen you read the HTML
I believe you could simplify this slightly though - do you really need the
compile
I am learning Angular, and although the recommended way to view the
index.HTML file is via http thru the web-server, but I accidently ran it
directly via the file:\\\ protocol. A few steps ran fine, the problem came
with the step-5 of the tutorial, when the phone catalog data is fetched
from
interesting poc !!
Thank you Marc
Le jeudi 27 mars 2014 15:55:30 UTC+1, Marc Loupias a écrit :
On 27/03/2014 11:29, Aymen Kadri wrote:
@Thai : i need an example using maven and that can be used in prod. And
can
i use yo/grunt for webapp and maven for back?
Hi,
i have built a
I knows this issue when I accidentally mistypo filename in src attribute, I
can't close my tab (google chrome), then I open devtools console, I think
angular will looping the process until file exists. Oh FYI I'm using
$routeProvider
On Fri, Mar 28, 2014 at 1:44 PM, Luke Kende
Hi Justin,
I want conditional directives (tooltips) inside other directive. As plnks
shows.
I used $compile because I don't know how can I otherwise add dynamic
directive?
Thanks for the plunk, I have tweaked it so I can read
text: http://plnkr.co/edit/qN1OCgP8mGn0dlOhB5BK?p=preview
But
* I'm using $routeProvider had similliar issue.
On Fri, Mar 28, 2014 at 3:38 PM, Ribhararnus Pracutian
oknoo...@gmail.comwrote:
I knows this issue when I accidentally mistypo filename in src attribute,
I can't close my tab (google chrome), then I open devtools console, I think
angular will
This post provides step by step
instructions:
https://bitbucket.org/david.antaramian/so-21662778-spa-authentication-example/overview
On Monday, February 10, 2014 3:51:05 PM UTC+2, Jake Peteman wrote:
Does anyone have any tips on how to use .Net Identity authentication with
AngularJS? I'm a
ps the solution for having nested views using
ng-switchhttp://www.bennadel.com/blog/2441-Nested-Views-Routing-And-Deep-Linking-With-AngularJS.htmwouldn't
work, since it would require a fixed set of possible subviews,
where my set of possible subviews is dynamic.
On Friday, March 28, 2014
Yep, that's a good idea. Thank you
On Friday, March 28, 2014 7:29:02 AM UTC+1, Luke Kende wrote:
Yes. I have used several other libraries with AngularJs. Mostly I try to
use angular only whenever possible, but when I use other libraries, it's
typically in services/factories. Technically
Hi,
I'm having a very odd, very frustrating problem.
I have made 2 services for service side interactions.
Injected them and then run .query in the problem is for whatever reason
the query is not executing and opening the php file it should.
When I try it locally it works, once uploaded to
Hey Luke Kende,
thanks for your suggestion ,I did it by using angular.toJson.
Thank u once again.
On Fri, Mar 28, 2014 at 11:39 AM, Luke Kende luke.ke...@gmail.com wrote:
Any time you use for in you will get every property including prototype
methods and properties of an object (arrays are
I smell some cors problem tbh, check out the developer console in your briwser
and confirm my hunch.
Sent from my iPhone
On 28/mar/2014, at 15:14, Sander Elias sanderel...@gmail.com wrote:
J,
What is/are the error(s) in the browser developer console?
--
You received this message
J,
What is/are the error(s) in the browser developer console?
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To unsubscribe from this group and stop receiving emails from it, send an email
to angular+unsubscr...@googlegroups.com.
To post to this
On Fri, Mar 28, 2014 at 3:19 PM, Kumar R new.kuma...@gmail.com wrote:
Hi, Vivek Suvarna,
This is technical forum don't post your advertisement here!
I've banned this gentlemen from posting.
Cheers,
Pawel
--
AngularJS book:
Its pretty easy. Its really just the scope that you $compiled your
directive with in the unit test in the first place. I'll just copy in one
of my tests, if it doesn't make sense i'lll explain it. Sorry its in
coffeescript if that bothers you.
Fyi this directive sets up a watcher on two fields
That works to... just be aware of for-in and prototype properties. toJson
uses the hasOwnProperty or similar in converting.
On Fri, Mar 28, 2014 at 7:07 AM, Deeksha Sharma
deeksha.sharma2...@gmail.com wrote:
Hey Luke Kende,
thanks for your suggestion ,I did it by using angular.toJson.
I'll have to give that a shot.
On Friday, March 28, 2014, Kamalakar Gadireddy kamal...@gmail.com wrote:
Jarrett,
Can you just have a log to check and see if `$scope.$parent` is defined,
this is the only thing i see which might be undefined. And my suggestion is
do not create a new or
Yep, I guess I can't have an isolate scope cause then the form elements and
stuff won't work.
On Friday, March 28, 2014, Jarrett Lusso jclu...@gmail.com wrote:
I'll have to give that a shot.
On Friday, March 28, 2014, Kamalakar Gadireddy
Sorry, John, I am not sure the above quite does it. This may or may not
matter, but I was thinking of a directive with isolate scope, ie:
app.directive('foobar', function(){
return {
restrict: 'E',
scope: {},
link: function(scope){
scope.doStuff = function(){};
}
};
});
how would you unit-test
on isolate scope you don't assert scope values. but directive behaviour.
so in unit test you trigger some event or sth. that calls doStruff and
assert expected result of doStruff.
On Friday, March 28, 2014 4:25:01 PM UTC+1, Nikita Tovstoles wrote:
Sorry, John, I am not sure the above quite
Weirdly, I did nothing and it fixed? very strange.
On Friday, 28 March 2014 14:20:36 UTC, lucian enache wrote:
I smell some cors problem tbh, check out the developer console in your
briwser and confirm my hunch.
Sent from my iPhone
On 28/mar/2014, at 15:14, Sander Elias
Hi, Vivek Suvarna,
This is technical forum don't post your advertisement here!
On Thu, Mar 27, 2014 at 9:05 PM, Vivek Suvarna viveksuv...@gmail.comwrote:
Hi ,
I hope you are having a great day!
We have an contract position with our Direct Client in *NJ - Mahwah *
*Looking for
I'm having trouble getting ngAnimate to work with content security policy.
It looks like ngAnimate is trying to add inline styles. Offending code is
[1]:
node.setAttribute('style', oldStyle + ' ' + style);
This causes the following CSP error for me:
Refused to apply inline style because it
Sorry, i just realized you were asking about scope functions, not scope
properties. If that doesn't give you what you need, let me know and i'll
throw a function in the unit test.
--
You received this message because you are subscribed to the Google Groups
AngularJS group.
To
Hi,
refer this link :
http://argutech.blogspot.in/2013/11/angularjs-nganimate-in-filter-array.html
hope useful to you!
On 3/27/14, calvin crane calvincr...@gmail.com wrote:
Is this similar which didn't really get much traction I think as I didn't
make a codepen etc..
I would like to have a proof of concept where, at 1 second intervals (say),
an AngularJS application makes an Ajax request and makes the resultant
object (from JSON) available to items in a particular scope, so that a
regular repeater can be used to build out HTML for part of the page, based
Ok thanks
On Mar 28, 2014 8:48 AM, Matjaž Lipuš matj...@gmail.com wrote:
on isolate scope you don't assert scope values. but directive behaviour.
so in unit test you trigger some event or sth. that calls doStruff and
assert expected result of doStruff.
On Friday, March 28, 2014 4:25:01 PM
Okay, so I had to actually write a service for the cache to see how it does
make a lot of sense. Good points.
Actually, another free advantage i got out of adding a caching service was
that I can avoid scope.apply()... which I was having to use because the
updates to the scope were not
Something that should probably be mentioned in regard to placing your model
in scope is that it makes services that consume $rootScope stuff harder to
test. Since services are instantiated before runtime, you can't just inject
a '$new' scope into the service to test - you have to build a mock for
I am looking for the best practices (good practice) placement for the
following code.
I have a Rails endpoint that currently gives back json objects like [{data:
A, date: 2014-01-02T14:42:01-08:00}, {data: B, date:
2014-01-03T14:42:01-08:00}, {data: C, date:
2014-01-03T14:42:01-08:00}]. I am
I just realized my title is a bit off from the content. There will be
out-of-range dates that are included in the json_array (like from last year
when I want to chart only last week) that will need to be excluded.
On Friday, March 28, 2014 2:41:45 PM UTC-7, Steven Harlow wrote:
I am looking
Hey everyone,
I think I have run into a snag and wanted to see if anyone can confirm my
assumptions?
I'm using ng-resource to load a REST api resource. I have a 1 view and 1
controller, is it possible to load the 2 different resources against one
view and one controller? Or do I need to
You could have functions within an isolated scope that are passed in via
the '' or just local functions directives would use. They just are not
tied to a controller. Is that something you need help with?
On Friday, March 28, 2014 9:55:12 AM UTC-6, Nikita Tovstoles wrote:
Ok thanks
On Mar 28,
Hey All,
I'm trying to get some tests but it is not working. I have a controller
that calls a service
var myCtrl = function($scope, someData) {
$scope.someData = someData;
someData.getCurrentQuestion();
};
return [ $scope, 'someData', myCtrl ];
I have a
Hi all,
Anyone have a best practice or a recommendation for updating the css of
views as a user navigates though an app.
Example, I have a list of items. User selects an item and clicks an edit
button. The item's edit page slides in from the side.
At the moment I am using a service that has
You'll want to inject $httpBackend
var $httpBackend;
beforeEach(inject(function ( _$httpBackend_) {
$httpBackend = _$httpBackend_
Then inside your test invoke $httpBackend.when() to mock the getting of the
data.
$httpBackend.when('GET',
'/some-url')
Thanks so much for the answer. $httpBackend will get me the actual json
file, right? I think I need fake data objects to create different tests,
would i be able to do that with $httpBackend?
On Friday, March 28, 2014 8:12:36 PM UTC-4, Luis De Avila wrote:
You'll want to inject $httpBackend
Have you thought about using requirejs?
On Friday, March 28, 2014 11:08:44 PM UTC-4, Shyam wrote:
I wanted to load ngGrid module on the fly when i need. Is there any way to
inject 3rd party modules in my main app module.
--
You received this message because you are subscribed to the Google
Yes Dan, i tried that one too, but problem is only with third party
modules, like ngGrid, ngTable. I tried with my own simple module, it works
fine. What is there in such 3rd party module, i am not getting?
On Saturday, 29 March 2014 09:24:35 UTC+5:30, Daniel Suarez wrote:
Have you thought
Hi Suma,
The simplest way is using
ngRepeathttp://docs.angularjs.org/api/ng/directive/ngRepeat(http://docs.angularjs.org/api/ng/directive/ngRepeat)
have look at the example in the docs. Push an element into the array to
which its bound would display an new row. For retrieving and showing you
48 matches
Mail list logo