Anton Trapp | 16 Oct 08:22 2014
Picon

Re: ng-model, directives, transclusion, scope, wtf?

Totally agree with Sander. Jens - thank you for trying to help. Other people would value it.

To Shelby: Many noobs (like me, not long using Angular for such a long time) are here. So if you are an expert, please make that clear in your question. Otherwise people can read and interpret it in "noob" mode. And many don't know what they are doing as they are beginning to learn/understand all the concepts. So a "you don't seem to know what you are doing" if absolutely OK for me in that context, because it is correct in many cases, especially when it comes to transcluded scopes :D

It will save all of us some time and the chance to get the answer you expected would grow.

Kind regards,
Anton

Am Dienstag, 7. Oktober 2014 17:49:52 UTC+2 schrieb Shelby Morris:
Hey,

We've been working with Angular for about 6 months on a fairly large project. Recently we came into contact with some odd behavior when attempting to use ng-model in a directive. I've attached a screenshot that should sufficiently explain my confusion. What's going on? 

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
David Shapiro | 16 Oct 07:39 2014
Picon

Feedback and testers wanted for Angular Custom Element

I created a module with a provider and service that integrates W3C Custom Element APIs w/ Angular element directives. 


You can define custom elements in a .config block x-tags style, and then data-bind their custom properties to a matching directive.  Trying to follow, as best as possible, the thinking in the design docs for 2.0 component directives.  The idea is to be able to export / import and share the elements (web components) w/ other frameworks in the page, and be suitable for production code in current (modern) browsers.

Given that this module doesn't actually solve any immediate functionality problem, its tough getting people to use and test it for feedback.  I'm particularly interested in the future patterns and best practices concerning stuff like how much data or functionality to encapsulate or initialize in the element vs. keeping in the framework, i.e. directive controller, and how. Also interested in inter-element communication, events, etc.  So putting this out there if anyone has some spare time to kill. 

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
AwesomeANgular | 16 Oct 00:01 2014
Picon

Table Data withing Table Data

i wanna show a table which consists of few rows, on clicking any row, it 
loads data related to that field in table format format at same place, how 
do i achieve it in angular using ui-routing ??

sam | 15 Oct 22:57 2014
Picon

failing to send user to a new state with ui-router

http://plnkr.co/edit/ne0N0oYJOGxZ2WGbD6fR?p=preview

click the button, and you'll only get a header and not the actual content: a form.

i've been struggling with this for a couple of hours, would someone be willing to help?

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
mark goldin | 15 Oct 21:48 2014
Picon

Angular AJAX call and plain Javascript call

The following Javascript code works fine and returns data:

var request = { id : 0, method : "someMethod", params : [] };
var http = new XMLHttpRequest(); 
http.open('POST', url, false);
http.withCredentials = true;
http.setRequestHeader('Content-Type', 'text/plain');
http.send(JSON.stringify(request));


But similar representation of that code in Angular fails:

module.factory("service", function ($http, $q) {
    return {
        getData : function(){
            var request = { id : 0, method : "someMethod", params : []};
            var deferred = $q.defer();
            var response = $http({
                    method: "post",
                    crossDomain: true,
                    withCredentials: true,
                    contentType: "text/plain",
                    request: JSON.stringify(request),
                    url: ".......",
                });
            response.success(function (data) {
                deferred.resolve(data);
            });
            response.error(function (data) {
                alert('Error');
            });
            // Return the promise to the controller
            return deferred.promise;
        }
    }
});

The error is this:

POST http://localhost:......... net::ERR_INVALID_HANDLE 


Any idea?

Thanks

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
VShah | 15 Oct 21:48 2014
Picon

datetime-local in AngularJS 1.2

Hi,

I am trying to bind datetime-local input in Angular 1.2 but noticed that datetime-local is only available in 1.3.
Is there a work around to get that ? Something like this "date" directive i found on group.

http://jsfiddle.net/GbWVu/

Thank you


--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Helder Santos | 15 Oct 20:32 2014
Picon

AngularJS and Foundation 5 integration

Hello,

I'm working for the first time with angularjs and foundation 5.

Things were working good, but I stomp in a "simple" problem.

Where is the best place to put $(document).foundation(); to boot all the components?

My index is built with some custom directives and a ng-view (routing).
Some foundation components, like dropdowns are located on the custom directives and others are locate inside the views that will be loaded on the ng-view.

If I use $timeout I can "fix" the problem...

For example, putting this function on my main model the problem disappears.
But the delay added on $timeout could be not enough on slow internet connections.

app.run(function ($timeout) { $timeout(function () { $(document).foundation({ offcanvas: { open_method: 'move', close_on_click: false } }); console.log("foundation init on $timeout"); }, 500); });

If I use something like:

app.run(function ($rootScope) { $rootScope.$on('$routeChangeSuccess', function () { $(document).foundation({ offcanvas: { open_method: 'move', close_on_click: false } }); console.log("foundation init on $routeChangeSuccess"); }); });

Components will work only after the view is loaded. If my custom directives load first than the content on ng-view, which is the case, the components inside the custom directives added directly on the index will not work.

I also found Angular Foundation http://pineconellc.github.io/angular-foundation/ but I´m afraid to rely on another "framework" that can be deprecated on future foundation or angular updates.

So... How can I integrate foundation with angularJS and cover all the situations?

thank you, for your time.

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Rajesh Kumar | 15 Oct 18:43 2014

Angularjs end to end testing with Protractor

I want to be able to test my Angular application with Protractor. I am using use RequireJS and getting this error "Error: Angular could not be found on the page: retries looking for angular exceeded". Is there any work around for this to use protractor for testing my angular app?

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Sander Elias | 15 Oct 12:47 2014
Picon

Re: ng-model, directives, transclusion, scope, wtf?

Hi Jens,

Your message is spot on!. 
Don't let one bring down your spirit. Some people just can't be helped!
Keep up the good work you are doing in our group!

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, send an email to angular+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.
Abdelmawla Mohamed | 15 Oct 12:31 2014
Picon

$rootScope.$broadcast or $rootScope.$emit didn't fire

Hello All,

I'm trying to figure out why this  Code <http://plnkr.co/edit/uY1Utm?p=info> is 
working as expected.

Thanks.

Jon Rimmer | 15 Oct 12:19 2014
Picon

How can a directive access its element's content after it has been completely compiled/interpolated?

If I have an element with a custom directive applied, containing an expression:

<div my-directive>
  {{ some.expression }}
</div>

How can my-directive know when some.expression has been evaluated and replaced in the DOM? How can it be notified when the expression changes and the DOM is updated?

I thought the post-link stage in the life-cycle was intended for this, but even at that point, accessing the element's HTML content reveals the expression has not been evaluated.

It seems like this is a vital part of the life-cycle to be able to hook into, but I can't see any obvious way to do it?

Jon

--
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+unsubscribe <at> googlegroups.com.
To post to this group, send email to angular <at> googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Gmane