Sanket Sahu | 18 Mar 08:35 2015
Picon

I created AngularHire.com for AngularJS Developers and Projects

Hi everyone,

In the weekend I created www.AngularHire.com, a community and directory for AngularJS developers and projects. Your feedback would be much appreciated and I thought since it is about AngularJS it would be good to share it with this group.

Best,
Sanket

--
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.
foysal foysal | 18 Mar 08:12 2015
Picon

User Authentication Tutorial

I am looking for User Authentication Tutorial using AngularJS, PHP and
MySql. Can anyone suggest me good tutorials regarding this.

Thanks

Foysal

庄奕峰 | 18 Mar 03:42 2015
Picon

Change href can't update the data which bind to ng-src or ng-href

I ask the same question in the stackoverflow, someone give a work solution using MutationObserver, but only IE11 support this feature. And I am also curious about why the function like scope.$watch() didn't work, is there some problem in my code? Or the $watch function can't achieve the desired results like MutationObserver?

The stackoverflow link: http://stackoverflow.com/questions/29104686/change-href-cant-update-the-data-which-bind-to-ng-src-or-ng-href

Html

<div class="result" ng-controller="test"> <div>{{result}}</div> <a ng-href="{{result}}"></a> </div>

JS

App.controller('AppCtrl', function AppCtrl($scope){ $scope.result = "www.google.com"; }

In a jquery file I can't modify because of some reason, some code changed the value of href, like:

$('.result>a').attr('href','www.youtube.com');

I want the value of $scope.result in the controller also changed from "www.google.com" to "www.youtube.com". But the result value in the div didn't change after the jquery code. Do I need write directive to watch the href attribute by myself? Or there are some other way to use ng-href? I try to write the directive by myself, but it didn't work. I hope you can give me a small example. Thanks :)

Update:

This is my directive, it didn't work, after something like $('.result>a').attr('href','www.youtube.com'), the console didn't print "change!" and the $scope.result didn't change:

APP.directive('result', function() { return { restrict: 'E', scope: { ngModel: '=' }, template: "<div class='result'><a ng-href='{{ngModel}}' href=''></a></div>", replace: true, require: 'ngModel', link: function(scope, element, attrs) { var $element = $(element.children()[0]); scope.$watch($element.attr('href'), function(newValue) { console.log("change!"); scope.ngModel = newValue; }) } }; });

Update Again: Still can't work...

Html:

<div class="result"> <a ng-href="{{result}}" ng-model="result" class="resulta"></a> </div>

JS:

APP.directive('resulta', function() { return { restrict: 'C', scope: { ngModel: '=' }, link: function(scope, element, attrs) { scope.$watch(attrs.href, function(newValue) { console.log("change!"); scope.ngModel = newValue; }) } }; });

--
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.
Shawn Shaw | 17 Mar 22:30 2015
Picon

Unit Testing with AngularJS $httpBackend problems

I am frustrated with my testing efforts thus far and am hoping someone can help.

I currently have a controller, LoginController, which depends on an authenticationSvc.

Within the LoginController, there is a $scope.login function which passes a user object off to the authenticationSvc.  That is the only code in the LoginController.

I'm trying to verify that a 200 response is returned from a successful login.  That's all I'm really trying to do, although eventually I would like to write an integration test that actually does login to the app and log out programmatically.  Different topic, but if there are any good tools for that, I would be very interested.

But back to the original problem.  I'm using karma as my testing environment, mocha as my framework, and should as my assertion library.

Currently I can get sanity "this should pass" and "this should fail" tests operating correctly.

My very simple code is from a blog post, but has been modified to call my authenticationSvc, and is as follows:

describe('with httpBackend', function() {
    beforeEach(inject(function($controller, $rootScope, $httpBackend) {
      $scope = $rootScope.$new();
      
      $httpBackend.when('POST', '/login')
        .respond({things: 'and stuff'});

      MainCtrl = $controller('LoginController', { $scope: $scope });
      $httpBackend.flush();
    }));
    
    it('should set data to "things and stuff"', function() {
      expect($scope.data).toEqual({
        things: 'and stuff'
      });
    });
  });


However, even though my karma.config.js file includes the declaration file of my LoginController, I'm experiencing the following error:

Error: the object { "message": "[ng:areq] Argument 'LoginController' is not a function, got undefined

What am I missing?  Shouldn't this be easier?

*bangs head against nearest wall*

Thanks for any help you can offer.

Cheers!

Shawn

--
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.
Greg Dorval | 17 Mar 21:10 2015
Picon

Question about AngularJS G+ community

Hi,

Before I post I want to know if it's ok to post job opportunities in the AngularJS G+ community.  There's no category for job postings and I know they're not welcome in some communities so I thought I'd check first.  Thanks.

Greg Dorval

Senior Data Architect at NAV Canada
greg.dorval <at> gmail.com

Phone: (613) 686-1508
Skype: greg.dorval
BBM PIN: 54BB8FAF


--
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.
Miguel Guedes | 17 Mar 19:50 2015
Picon

Angular trimming attribute value

I have got a directive acting on the document's title that accepts a `prefix´ attribute that is prepended to the actual document title. 

The problem I'm having is that Angular is trimming the contents even though I specifically need it to retain whitespace.  I've tried using the `ng-trim="false"´ directive but still no luck.

The directive is intended to be used as follows:

<title prefix="App - ">Default app title</title>

What can be done to disable trimming?

--
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.
Komal Singh | 17 Mar 19:19 2015
Picon

can i link with DLL and API with angularJS

Hi
i am new user of AngularJS. i am planning a project so if i make my project 
on AngularJS then can i link DLL files and my project API with angularJS?

Thanks in advance
Komal Singh

Umair Shahid | 17 Mar 11:40 2015
Picon

Integration Of JointJs with Angular

Hi
Need Help in integration of jointjs with anuglarjs.
Anyone who know please help me

Antonio Gil | 17 Mar 10:21 2015
Picon

Bind variable in script tag

Hi!

How I can bind variable in script tag inside head tag?

Example (highlighted in red):

index.html

<!doctype html>
<html ng-app="miApp" ng-controller="AppCtrl as vm">
    <head>
        <script type="text/javascript">
            var idAnalytics = '{{vm.idAnalytics}}';
            var param = '{{vm.param}}';
            //more code....
            ga('create', idAnalytics, param);
        </script> 
    </head>
    <body ng-cloak translate-cloak>        
        <div ng-cloak="" ui-view="viewContainer"></div>
    </body>

    <!-- LINK TO JS SCRIPTS -->
</html>
</body>

Is this possible?

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.
Muhammad Omer | 17 Mar 07:22 2015
Picon

export pdf in angularjs

Hello all,

i want to know that how can i export pdf file from angularjs. ive exported excel file and it is working fine.

following is code for excel


    $scope.exportData = function () {
        debugger;
        var blob = new Blob([document.getElementById('export').innerHTML], {
            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"
        });
        window.saveAs(blob, "Report.xls");
    },

how to do 
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8" <======this line
in pdf?

--
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.
Owen Williams | 17 Mar 07:01 2015
Picon

applying a class to ui-view depending on the current state (ng-enter doesn't trigger)

See http://plnkr.co/edit/3QjBzRu5VjOzK7czn71e?p=preview

I'm applying a class to ui-view depending on the current state - so I can target each new view and apply different animations..

The issue is: the state class seems to be added after the ng-enter class (see plunker above).  So initial transitions (which should executr on ng-enter) just wont fire.

Any advice would be much appreciated!

--
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