[AngularJS] Re: Using a directive to prevent other directives to execute

2014-04-16 Thread Luke Kende
Personally, I would approach the problem a different way all together. Trying to intercept the click and stop propagation sees hack-ish. No? Other approach ideas: - put a flag on rootScope defining whether the user is logged in or not and reference it in the logic functions like ng-click or

[AngularJS] Re: Directive Load Lazy

2014-04-16 Thread Luke Kende
Sounds like you need to ensure that jquery and autocomplete plugin are loaded in your index file before angular script refernces. Why lazy load? Also, check that iElement is the full jquery reference you think it is at the time the directive loads: app.directive('ngAutoComplete', function($ti

[AngularJS] Re: Separating functionality of a directive?

2014-04-16 Thread Luke Kende
I agree to separate them out into separate directives, which makes then easier to manage and makes them portable. Making them all work together may be a bit trickier, but it can be done. I have several directives used for inputs to add the functionality I need, like: select-on-focus (selects

[AngularJS] Re: Call a function into a directive, passing parameters

2014-04-16 Thread Luke Kende
http://stackoverflow.com/questions/17583004/call-an-angularjs-controller-function-from-a-directive-without-isolated-scope On Wednesday, April 16, 2014 6:57:35 PM UTC-6, Michel Morelli wrote: > > Hi all, > > I have a custom directive. > > In my html i write this: > > > success="writeFid()"> > >

[AngularJS] Re: Enable/disable button if value is different than select by default

2014-04-16 Thread Luke Kende
A plunker would help illuminate the issue. It looks like you are trying to mix jQuery with angular which is not a good idea inside the controller. Also, the way you think has to change with angular since it's a declarative language. Here's a plunk I wrote to demo an approach: http://plnkr.co

[AngularJS] Re: Enable/disable button if value is different than select by default

2014-04-16 Thread Gordon Bockus
If you are using bootstrap I've found that I need to have ng-disabled="!btnStatus" and ng-class="{'disabled'=!btnStatus}" to have the button function as expected. On Wednesday, April 16, 2014 10:24:29 AM UTC-5, Reynier Pérez wrote: > > I need to toggle a button state between enabled/disabled if

[AngularJS] Re: Call a function into a directive, passing parameters

2014-04-16 Thread Gordon Bockus
Hi Davide, I think what you are trying to do is a misuse of the $scope.$eval service. I googled around and the majority of suggestions around this question deal with creating a service and having the directive and controller interactive with the server separately. There are also several soluti

[AngularJS] Call a function into a directive, passing parameters

2014-04-16 Thread Ziobudda
Hi all, I have a custom directive. In my html i write this: What I need is to exec "success" attribute function passing some parameter data that I get from my directive. I can exec "success" attribute function via $scope.$eval($scope.success) and in my "controller" I have this: $scope.wr

[AngularJS] Separating functionality of a directive?

2014-04-16 Thread Ryan Zec
What is the best way to separate out different core pieces of functionality? For example I have a extend component that has auto complete, tagging, and search query functionality. I would like to separate those pieces of functionality into separate directives t make it easier to change or even

[AngularJS] Any news about ngAppRoute?

2014-04-16 Thread Jacob Rief
Today I came across issues #3102 , #2805 and #6129 which all are related to a problem I share with many others: When html5mode=true, how can I

Re: [AngularJS] Re: Default Directive Scope Values?

2014-04-16 Thread Travis Parks
I have tried this approach in production and ran into the following error messages: Error: [$compile:nonassign] Expression 'undefined' used with directive '' is non-assignable! After a little research, I discovered this was due to two-way binding. Since the attribute does not appear in the HTML,

[AngularJS] Why isn't http://new.cjsh.name working?

2014-04-16 Thread Christos Jonathan Seth Hayward
As posted in http://stackoverflow.com/questions/23117337/why-is-this-angualrjs-data-binding-not-working, I have an attempt at including unescaped HTML in a modification of step 3 of the AngularJS tutorial, at http://new.cjsh.name. ​I seem to have broken it. What can I do to get name and snippet t

[AngularJS] Re: Restangular and POST

2014-04-16 Thread Sandeep Chandra
I will paste the question here as well I am trying to call Asp.Net WebApi method declared as: [HttpPost] [ActionName("Login2")] public bool Login(UserInfo userinfo) { return userinfo.Username == "sandeepsa" && userinfo.Password == "chandra"; } And

[AngularJS] Convention over Configuration and AngularJS 2.0

2014-04-16 Thread Kurakin Alexander
Rob Eisenberg says in "Angular and Durandal Converge" blog post: Here's a few examples of ideas I've contributed which I'm excited about: *Convention over Configuration* - Wouldn't it be nice if you could teach the underlying

[AngularJS] Restangular and POST

2014-04-16 Thread Sandeep Chandra
I am having issues with restangular calling Post. I have asked this question on Stackoverflow and none of the proposed solutions have worked. Please have a look at it here and let me know if Restangular will work

Re: [AngularJS] Re: Consuming REST api and my confusion

2014-04-16 Thread john.tiger
On 04/16/2014 10:14 AM, Neil Camara wrote: That means, I need to include both. UI-router for accessing interface neatly and $resource/restangular for my REST calls. not really. you can make a rest call (ie /api/posts) directly within a controller with $http without using $resource or restangu

Re: [AngularJS] Re: Consuming REST api and my confusion

2014-04-16 Thread Neil Camara
Will do Paul. Thanks for the advice! :) On Wednesday, April 16, 2014 12:40:54 PM UTC-5, Paul Savka wrote: > > Neil, > > something I learned LONG AGO was to first remove the stress of > messing up an already functioning app to somehow add a functionality to it > or what not. WHEN IN DOUB

Re: [AngularJS] Re: Consuming REST api and my confusion

2014-04-16 Thread Paul Savka
Neil, something I learned LONG AGO was to first remove the stress of messing up an already functioning app to somehow add a functionality to it or what not. WHEN IN DOUBT, make a save folder and save your entire Working version of it in there, then feel LESS STRESSED to play around with th

[AngularJS] Re: Consuming REST api and my confusion

2014-04-16 Thread Neil Camara
That means, I need to include both. UI-router for accessing interface neatly and $resource/restangular for my REST calls. Thanks a lot! On Wednesday, April 16, 2014 8:21:26 AM UTC-5, Neil Camara wrote: > > Hi folks, > > I now need to start working on the code that will make a call to our REST >

[AngularJS] Enable/disable button if value is different than select by default

2014-04-16 Thread reynie...@gmail.com
I need to toggle a button state between enabled/disabled if I change the default value of a select element. Take this HTML as example: cm-534be5d66aea3 cm-534be5d681a02 cm-534be5d68316e And this is the code I wrote but it's not working: $scope.statusBt

[AngularJS] Re: Editable JSON tree AngularJS directive

2014-04-16 Thread krispo
Hi, json-tree is now draggable and sortable. Enjoy! Best regards суббота, 22 февраля 2014 г., 19:57:15 UTC+6 пользователь krispo написал: > > I would like to announce, that following new features have been added: > > * add new JSON nodes to the collection

[AngularJS] Directive Load Lazy

2014-04-16 Thread Diwan Oli M
Hi , I am facing some issue in loading directive , when i use the directive i am getting error "autocomplete" not an function , after that identify jquery plugin not getting load before directive load , can you please give how to implement lazy load this directive app.directive('ngAutoComplete

[AngularJS] Re: how to have directive update when root object of the property path is changed?

2014-04-16 Thread Aaron Fischer
Thanks for the help in the directive I had to setup a watcher on the data bound property, but your correct I think the use of ng-model led me to believe magic would happen. On Tuesday, April 15, 2014 8:24:19 PM UTC-7, Sander Elias wrote: > > Hi Aaron, > > You forgot to include your templates in

Re: [AngularJS] Consuming REST api and my confusion

2014-04-16 Thread Thomas Murphy
Hi Neil, ui-router doesn't have anything to do with REST (or HTTP really), so you won't find any info about it in those docs. $resource is the baked-into Angular way of doing REST-ful calls, and Restangular is a quite popular third-party library for implementing REST. On Wed, Apr 16, 2014 at

[AngularJS] Consuming REST api and my confusion

2014-04-16 Thread Neil Camara
Hi folks, I now need to start working on the code that will make a call to our REST endpoint. This morning, I read https://github.com/angular-ui/ui-router. I didn't see any mention about REST. I continued searching and found two solutions, using $resource - http://fdietz.github.io/recipes-wi

[AngularJS] Re: How to access server side configuration in $log decorator

2014-04-16 Thread Daniel Reznick
Thanks, I appreciate it, will try it. On Tuesday, April 15, 2014 7:24:38 AM UTC+3, Gordon Bockus wrote: > > Hum...I had to look around quite a bit to find a solution that would work > for this. I think you need to first create a module to hold you > configuration data. Check out his article fo

[AngularJS] Problem with POST request in mock httpBackend

2014-04-16 Thread Dinu
I used protractor e2e test in my angularjs application using mock $httpBackend. I have problem with POST request, when i am trying to returning mock data(JSON object) for response, the post data in the header body will actually returned, EX: * var mockData = {}; $httpBackend.whenPOST('

[AngularJS] IE favicon disappeared when navigating other page in angular application

2014-04-16 Thread Eran Bar-Oz
I found an issue with angular application. I noticed that the favicon is disappearing when navigating between pages. I'm using IE11 edge document mode. Does anyone bumped into this too? Thanks -- You received this message because you are subscribed to the Google Groups "AngularJS" group. T

[AngularJS] Angularjs: ng-repeat rendering differes in Firefox , IE , Chrome

2014-04-16 Thread salman zafar
Scenario: i have ng-repeat that renders 20 elements. all browsers rendering perfectly but time differs , i have used directive to calculate rendering time http://stackoverflow.com/questions/23103758/angularjs-ng-repeat-rendering-differes-in-firefox-ie-chrome IE 10: ng-repeat list took: 170-

[AngularJS] Using a directive to prevent other directives to execute

2014-04-16 Thread Michel Parpaillon
Hi everyone, I already post this issue on Stack Overflow but nobody seems to be able to help me. So here I am. Some actions in my Angular app require the user to be registered. If the user is not, we want to show him a "Register modal" and prevent the original action. Those actions can be trig

[AngularJS] Using a directive to prevent other directives to execute

2014-04-16 Thread Michel Parpaillon
Hi everyone, I already post this issue on Stack Overflow but nobody seems to be able to help me. So here I am. Some actions in my Angular app require the user to be registered. If the user is not, we want to show him a "Register modal" and prevent the original action. Those actions can be trig