Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
SesioN
@SesioN
@frederikprijck I've been using this directive in my app, https://github.com/indrimuska/angular-switcher, some of my objects functions are defined as getter/setter
and I need to use those also with the directive that I linked, but when supplying my getterSetter as in the directive2 at plunker
it doesn't work.. so I was looking on how I can make it support both, normal and getterSetter
Mahadevan
@karthic2914
earlier one which posted that was working now
thanks for all
now i have one more query i am using ng-message to show the error
 <form name="loginName" ng-controller="loginCtrl"  ng-submit="signIn()" no-validate>
                <div class="margap15px"></div> 
                    <div class="input-group margin-bottom-sm">
                      <span class="input-group-addon"><i class="fa fa-user fa-fw iconColor"></i></span>
                      <input class="form-control" name="user_name" ng-model="user_name" type="text" placeholder="Username" required>
                    </div>
                     <div ng-messages="loginName.$submitted && loginName.user_name.$error" >
                        <p ng-message="required">Username is required.</p>
                    </div>
                    <div class="margap15px"></div>
                    <div class="input-group">
                      <span class="input-group-addon"><i class="fa fa-key fa-fw"></i></span>
                      <input class="form-control" name="pass_word" ng-model="pass_word" type="password" placeholder="Password" required>
                    </div>
                     <div ng-messages="loginName.$submitted && loginName.pass_word.$error">
                        <p ng-message="required">Password is required.</p>
                    </div>
                    <div class="margap15px"></div>
                  <input type="Submit" value="Submit"/>
                </form>
but i am getting jquery validation not ng messages
Frederik Prijck
@frederikprijck
@karthic2914 Not sure if that's the reason, but u should use novalidate not no-validate
Mahadevan
@karthic2914
we shouldn't use novalidate we have to use no-validate
i checked tht
actually i am getting the error message as tool tip please fill out this field
i have not given this message at all
Frederik Prijck
@frederikprijck
@karthic2914 Where did u see that u need no-validate ?
Afaik there aint no no-validate attribute on a form.
Renato Martins
@orochamartins
Guys, when creating a component like this:
app.component('menu',{
    templateUrl: 'components/menu/menu.html',
    controller: 'menuController'});
If i put some function in that 'menuController'
do i need to connect 'menuController' in my 'menu.html' template?
Frederik Prijck
@frederikprijck
@orochamartins No, all controller methods are available in the html on the $ctrl object by default. (for components this is)
Frederik Prijck
@frederikprijck
@orochamartins This only counts for controller methods, not functions inside the controller.
Renato Martins
@orochamartins
So lets imagine i have a function inside that controller above called 'putData'. If i want to use that function on my template. I need to to $ctrl.putData ? Even if that function doesnt need any params?
Frederik Prijck
@frederikprijck
If it's a method, u can do : $ctrl.putData(). (you do need the () part)
romie
@theromie
@theromie
after configuring node angular app still getting this error
http://localhost:3000/node_modules/core-js/client/shim.min.js
localhost/:13 GET http://localhost:3000/node_modules/zone.js/dist/zone.js
localhost/:14 GET http://localhost:3000/node_modules/reflect-metadata/Reflect.js
localhost/:15 GET http://localhost:3000/node_modules/systemjs/dist/system.src.js
localhost/:17 GET http://localhost:3000/systemjs.config.js 404 (Not Found)
(index):19 Uncaught ReferenceError: System is not defined
at (index):19
romie
@theromie
??
Frederik Prijck
@frederikprijck
@theromie wrong room. This is Angular1; U want Angular2: https://gitter.im/angular/angular
vanagasa
@vanagasa
Hi im trying to pass paramether with: <a ng-click="getCity(cityArr[0])" and use it in script with: var weatApp = angular.module('WeatApp', []); weatApp.controller('weatCtrl', function($scope, $http) { $scope.cityArr=['KAUNAS', 'VILNIUS', 'KLAIPEDA', 'SIAULIAI', 'PANEVEZYS']; $scope.getCity = function(city){ $scope.sendCity=city; return city; and it doesnt get value back to html: <span id="weather" ng-cloak>{{sendCity}}</span> what im doing wrong?
Frederik Prijck
@frederikprijck
@vanagasa No idea, it seems to work for me: https://plnkr.co/edit/0TOe5o3JvxJ8q3etdCHX?p=preview
Stepan Suvorov
@stevermeister
what is the best way to find broken injection during minification?
I have too many services to check them one by one
now I'm deep inside injector to put debugger there
not sure what is the best place to track it
Frederik Prijck
@frederikprijck
@stevermeister Using strict-di in none-minification mode might help .
Tools like ng-annotate let you use implicit dependency annotations in your app and automatically add inline array annotations prior to minifying. If you decide to take this approach, you probably want to use ng-strict-di.

Long store short:

<html ng-app="myApp" ng-strict-di>
or

angular.bootstrap(document, ['myApp'], {
  strictDi: true
});
Stepan Suvorov
@stevermeister
it really helps!
@frederikprijck thanks a lot!
Frederik Prijck
@frederikprijck
Glad it works !
Robert Butler
@lighth7015
OKAY, so I'm trying to create a pageable table that supports a single selection across the whole list. I'm using
($index == $ctrl.selected.index && $ctrl.page == $ctrl.selected.page)
to (attempt) figuring out if the selection was on that page, do I need to re-trip the html creation by emptying out my temporary listview every time I change pages?
Frederik Prijck
@frederikprijck

Can you create a plunkr @lighth7015 ? Not very clear what you want to do, or atleast not what you mean with:

do I need to re-trip the html creation by emptying out my temporary listview every time I change pages?

Robert Butler
@lighth7015
Sure.
Robert Butler
@lighth7015
okay, that's weird.
I have a working example on Plunkr, but when I move it over to my production code, it stops working properly
Frederik Prijck
@frederikprijck
That happens alot.
That often means you have different versions, or the problem is in ur app.
Robert Butler
@lighth7015
yeah, it's weird though
because you think you've fixed a problem when you're on Plunkr, only for it to not work when you go plug it in, lol