These are chat archives for angular/angular.js

18th
Jan 2017
Arup Rakshit
@aruprakshit
Jan 18 2017 07:06
Why this error "Uncaught Error: [$injector:modulerr] Failed to instantiate module temp2 due to:” comes in browser console, any idea? https://plnkr.co/edit/uizhoMc3ItaOCjMSc6pk?p=preview
Frederik Prijck
@frederikprijck
Jan 18 2017 07:11
@aruprakshit I guess the part behind due to might be somewhat relevant.
Arup Rakshit
@aruprakshit
Jan 18 2017 07:11
ok . but I am not getting the reason.
the module it is telling not loaded, is there I see.
but not able to focus exactly what is missing.
Frederik Prijck
@frederikprijck
Jan 18 2017 07:12
Can you show me the message it's logging in the console?
Arup Rakshit
@aruprakshit
Jan 18 2017 07:12
it is the browser console
if you open the chrome console, it is right there.
Frederik Prijck
@frederikprijck
Jan 18 2017 07:13
Uncaught Error: [$injector:modulerr] Failed to instantiate module temp2 due to:
Error: [$injector:modulerr] Failed to instantiate module ui.grid due to:
Error: [$injector:nomod] Module 'ui.grid' is not available!
Arup Rakshit
@aruprakshit
Jan 18 2017 07:13
yes
Frederik Prijck
@frederikprijck
Jan 18 2017 07:13
Module 'ui.grid' is not available!
Arup Rakshit
@aruprakshit
Jan 18 2017 07:13
but I referrenced it to the index.html page
Frederik Prijck
@frederikprijck
Jan 18 2017 07:14
@aruprakshit
blob
Arup Rakshit
@aruprakshit
Jan 18 2017 07:15
yes i forked it from there
because the canges in http://embed.plnkr.co/fsJdENoN1ll4FUGsPzts/ I can’t save. But I can export it to plunker. I did that only
and it is broken in plunker
Frederik Prijck
@frederikprijck
Jan 18 2017 07:16
Yes, that's not over https.
The error in de console is pretty clear.
Arup Rakshit
@aruprakshit
Jan 18 2017 07:16
I did some modifications to ^ this plunker.. and then wanted to ask here other question. And as it is not letting save, I exported.
Frederik Prijck
@frederikprijck
Jan 18 2017 07:16
You can't use scripts over http when plunkr is on https.
Arup Rakshit
@aruprakshit
Jan 18 2017 07:16
ok let me read
Frederik Prijck
@frederikprijck
Jan 18 2017 07:16
Arup Rakshit
@aruprakshit
Jan 18 2017 07:16
got you .. :)
Frederik Prijck
@frederikprijck
Jan 18 2017 07:17
All I did was use the correct (https) CDN urls.
Arup Rakshit
@aruprakshit
Jan 18 2017 07:18
@frederikprijck thanks friend. yes it is now working. I didn’t notice it.
so my question now is. When I am updating field “field 1”, I want to autoupdate the “field” like “100 - field1” and when it is field2 “100-field2”.. How can I do it?
Frederik Prijck
@frederikprijck
Jan 18 2017 07:19
@aruprakshit The fields are not editable?
Manoj Sathe
@manojsathe7_twitter
Jan 18 2017 07:20
hello everyone. Can anyone plz tell where and how to become expert in angular JS
I am learning angular
Arup Rakshit
@aruprakshit
Jan 18 2017 07:20
ok 1 min. let me change and i’ll give the plunker again
I am creating the use case in plunker as per my actual app
give me few mins
hrishikeshsoman
@hrishikeshsoman
Jan 18 2017 07:22
Hi Guys, I just need to use an external library 'angular-bootstrap-calendar' in my angular1 application. I am using webpack and npm. My question is I need to customise that library a little bit. So whats the best possible way to include that library in my application ?
Manoj Sathe
@manojsathe7_twitter
Jan 18 2017 07:23
@aruprakshit Hi Arup
@aruprakshit what is the best way to learn layouts practice
theoratically i hv learnt hrml and css all. but practically i m new
Arup Rakshit
@aruprakshit
Jan 18 2017 07:26
I am super noob. Don’t ask me. Ask questions here in general.. other people will help
don’t mention anyone name, then u will be avoided.. :)
Manoj Sathe
@manojsathe7_twitter
Jan 18 2017 07:27
ok
sorry
I am new here
thanks
Hi guys How to be champ in html layouts
Arup Rakshit
@aruprakshit
Jan 18 2017 07:29
I added editable option, but not letting me edit https://plnkr.co/edit/uizhoMc3ItaOCjMSc6pk?p=preview
Frederik Prijck
@frederikprijck
Jan 18 2017 07:37
@aruprakshit I'm not aware of how ui-grid works so maybe ask at https://gitter.im/angular-ui/ui-grid
@aruprakshit You don't get avoided for mentioning people directly. But it's generally better to not mention people directly when asking a question. There's so many others that might be able to help u.
Arup Rakshit
@aruprakshit
Jan 18 2017 07:38
yeah.. but I got this learning from other IRC channel, when I was there. :)
thanks for pointing me to the correct gitter channel
Tobbe
@tobbbe
Jan 18 2017 09:12
how bad is it to do this in my UserService: $rootScope.User = this;
:D
George Kalpakas
@gkalpak
Jan 18 2017 09:24
The question you should ask yourself is: How necessary is it? And why?
:)
Frederik Prijck
@frederikprijck
Jan 18 2017 09:39
I think their are two problems with using $rootScope.User = this; in something called UserService
  • Generally a UserService is not the same as a User Object. I'd guess this will point to the instance of UserService. So I don't realy like to put an instance of UserService in a variable named User. Even tho this will work, I don't think it's the best approach.
  • using $rootScopeshouldn't be neccesary.
I don't even get why you want to expose a singleton instance on a rootScope variable anyway :D
Tobbe
@tobbbe
Jan 18 2017 11:42
well my UserService is a singleton containing the logged in user and Ill access the Users properties in alomst every view so I thought doing this instead of this.user = UserService.current in every view-controller would be smarter
and in my case the UserService is the same as a User Object hehe
George Kalpakas
@gkalpak
Jan 18 2017 11:53
I've put my equivalent of UserService.current on my top-level controller before. This way it can be easily accessed in the view. But for accessing it inside other controllers, DI is much better (more declarative, more robust, more test-friendly).
Frederik Prijck
@frederikprijck
Jan 18 2017 12:14
I guess using top-level controller is a better idea then using $rootScope. But I'd still avoid both as this might get complex if the app grows. But I guess legacy system still have code like that. But I'd realy avoid $rootScope.User = this. I'd use something like: $rootScope.User = userService.currentUser; in e.g. a run function.
Sebastian Hoffmann
@s-hoff
Jan 18 2017 12:18
Hello! Does anyone here have some experience with screen reader support or JAWS specifically?
Arup Rakshit
@aruprakshit
Jan 18 2017 16:41
Ok I am returning false but still my input field is not “disabled”.. what need to be done? https://plnkr.co/edit/whlGBiwjXtBOnkc1noFv
Arup Rakshit
@aruprakshit
Jan 18 2017 16:51
nvm ignore me
John Nolette
@neetjn
Jan 18 2017 16:52
:+1:
gargtushar
@gargtushar
Jan 18 2017 18:54
@gargtushar
Hello Friend
Hello all
I need help
I am using trackBy in ngFor
but the variables defined in constructor are not accessible in trackBy function
please help me
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:09
Oh my....multi-line template strings are invalid in internet explorer??? WTF
George Kalpakas
@gkalpak
Jan 18 2017 19:12
@gargtushar: Wrong channel. Try on https://gitter.im/angular/angular.
gargtushar
@gargtushar
Jan 18 2017 19:13
thanks
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:20
another reason IE needs to die
Frederik Prijck
@frederikprijck
Jan 18 2017 19:37
multi-line template strings are invalid in internet explorer??
Realy ?
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:37
Yes
Terrible
Frederik Prijck
@frederikprijck
Jan 18 2017 19:38
And are you talking about a components template ? (template: ... )
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:38
gonna take about 4 hours out of my day fixing these, grrrrrr
yeah those and and any other things that use templates
formly, ui grid, etc
Frederik Prijck
@frederikprijck
Jan 18 2017 19:38
And what version of IE ?
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:38
any version
supported in Edge but not IE
Frederik Prijck
@frederikprijck
Jan 18 2017 19:39
How are you defining the multiline template strings ?
Isn't that something only available in ES6?
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:39
`<div>
`
Yes
Frederik Prijck
@frederikprijck
Jan 18 2017 19:40
So all you have to to is transpile it to ES5, no?
No need to rewrite stuff.
You'll be having issues in other browsers (even older chrome and firefox) aswell, if you're not transpiling to es5
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:41
I gotta write it as '<div>' +
for each line
Frederik Prijck
@frederikprijck
Jan 18 2017 19:41
No.
You gotta transpile es6 to ES5.
Aren't you using a transpiler to do so ?
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:41
how?
Frederik Prijck
@frederikprijck
Jan 18 2017 19:41
You shouldn't be using ES6 syntax directly in the browser.
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:42
oh babel
Frederik Prijck
@frederikprijck
Jan 18 2017 19:42
Are u using webpack ?
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:42
no
Frederik Prijck
@frederikprijck
Jan 18 2017 19:42
Babel does the trick idd.
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:43
or Traceur also I think right?
Frederik Prijck
@frederikprijck
Jan 18 2017 19:43
Yep.
I guess there's still others.
So use a transpiler and enjoy the newest things in JS.
Without browser limitation.
Matt Erman
@CodeLiftSleep
Jan 18 2017 19:46
that's pretty dan awesome...thanks for leting me know
damn and letting