These are chat archives for angular/angular.js

6th
Nov 2016
Chakshu Goyal
@chakshu8
Nov 06 2016 03:38
Hello World!
RakeshNerkar
@Rakesh18754
Nov 06 2016 04:03
@gkalpak , @frederikprijck
Can we view the partials in the chromes sources tab ...as i am able to view my JS , CSS of a compnent only thing missing all the HTML partials ...i am also anle to view the index.html file but not the partials .....any suggestions on this?
Punita Ojha
@punitaojha
Nov 06 2016 04:42
This message was deleted
George Kalpakas
@gkalpak
Nov 06 2016 06:20
@Rakesh18754, no, you can't view them in the sources tab, because they are not included as resources in your index.html. If you are fetching them with HTTP requests from the server, you can look them up in the Network tab of the Developer Tools.
RakeshNerkar
@Rakesh18754
Nov 06 2016 06:22
ok
George Kalpakas
@gkalpak
Nov 06 2016 06:22
@punitaojha, if the variables are declared in the repeated template, they belong to the new child-scope created by ngRepeat for each repeated item, so you can't access them (in a reasonable way) from outside. It would help if you showed us the code or better yet create runnable demo (e.g. using CodePen, Plnkr etc).
@gkalpak i am getting this error in my console:-Failed to load resource: administraion.html not found
George Kalpakas
@gkalpak
Nov 06 2016 06:28
@Rakesh18754, no I can't help you. There is a lot of info missing. How is your app served, from what URL, what is your server config etc? Since this is a local problem specific to your setup, you are in the best possition to debug this.
RakeshNerkar
@Rakesh18754
Nov 06 2016 10:52
@gkalpak ok...i found out that when i run the project through sublime text it was not running but when i executed it with webstorm...it is running perfectly with the same code no chagnes.....dont know why....
Frederik Prijck
@frederikprijck
Nov 06 2016 10:53
@Rakesh18754 rakesh define running in sublime and running in webstorm
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:06
@frederikprijck i mean Executing the index.html file
Frederik Prijck
@frederikprijck
Nov 06 2016 11:07
How are u executing it in both sublime and webstorm?
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:08

@frederikprijck first i was using sublime text for my project >> it gave error while routing like cannot get admin.html file not found error in console

but when i switched to webstorm it worked fine!!

Frederik Prijck
@frederikprijck
Nov 06 2016 11:09
You are still not replying to my message. I'm trying to find out what's different in Ur webstorm setup
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:11
yeah ....tats what i dont know......
Frederik Prijck
@frederikprijck
Nov 06 2016 11:12
How are u executing it in both sublime and webstorm?
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:19
@frederikprijck right click on index.html and open in browser
Frederik Prijck
@frederikprijck
Nov 06 2016 11:19
OK so there is not much that is related to sublime or webstorm?
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:20
yes...but then wats the problem any idea?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:20
No
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:20
bcoz i am not doing any code changes
Frederik Prijck
@frederikprijck
Nov 06 2016 11:20
Hard to tell with so little info
What happens when u open the index file from Ur file system?
Or what browser are u using?
Coz you are not supposed to open an index. Html file unless u are running a web server
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:21
chrome
Frederik Prijck
@frederikprijck
Nov 06 2016 11:21
So I guess webstorm might spawn a webserver for u
And sublime won't
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:22
through file system it gave an error File not found
so r u saying that if i change the file name from index it will work?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:22
No
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:23
ok.....
Frederik Prijck
@frederikprijck
Nov 06 2016 11:23
HTML files using JavaScript or including other files like css are generally best served over a web server
There are quiet some options to do so
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:23
do u know any other editor than webstorm which will spawn a webserver for me?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:24
I use npm packages to do so
let me help u:
Go to your project folder where your package.json file is located
run npm install lite-server --save-dev
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:25
ok
Frederik Prijck
@frederikprijck
Nov 06 2016 11:25
next open up package.json and add a line to the scripts section
"lite-server": "lite-server"
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:26
i dont have a package.json file r u asking from whr the plugin r coming?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:26
you have no package.json ?
oké
Have you done some tutorials etc ?
Anyway, I never use things like webstorm to spawn my server, I use npm for things like this.
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:27
i have created a plugin folder and thier i have dumped all the min.js
yes ...but still in learning phase
Frederik Prijck
@frederikprijck
Nov 06 2016 11:28
so maybe learn what npm is about
I can continue to explain how to use lite-server
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:28
yeah i knw npm
Frederik Prijck
@frederikprijck
Nov 06 2016 11:28
want me to continue ?
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:28
yes
Frederik Prijck
@frederikprijck
Nov 06 2016 11:29
So you have no package.json, create one in the root of ur project by running npm init
Sampath Tharanga
@SampathTharanga
Nov 06 2016 11:29
Hello World! i'm sampath in srilanka. And also i'm university student. i study in computer science and mathematics. i developed some projects. i want to learn AngularJS. What i do that? can you help me guys.
Frederik Prijck
@frederikprijck
Nov 06 2016 11:29
Next, you add the lite-server dependency as I showed u here: :point_up: November 6, 2016 12:24 PM
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:29
@frederikprijck can u tell me....why this is happening?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:30
Why is what happening ?
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:30
ok then?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:31
I just want to check if your index.html file is working using lite-server
If it's working, I'll explain why.
If not, I wont :D
If you added the scriptsparts, open ur terminal and execute: npm run lite-server --baseDir ./src --port 3333, replace ./src to the folder containing your html file
This should spawn a webserver, so you should be able to succesfully execute the index.html file by navigating to http://localhost:3333
@Rakesh18754 One more question regarding sublime and webstorm: What's the url in chrome when u open it in sublime? And what's the url when opening it with webstorm ?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:36
Yep makes sense.
Webstorm is spawning a webserver which lives on the port 63362 on your localhost.
Sublime just opens the files as a filepath.
So using lite-server should fix it, and basicly that's the reason why it's not working.
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:37
ok.....does bracktes editor also spawn a webserver
as webstrom is not free tats y
Frederik Prijck
@frederikprijck
Nov 06 2016 11:37
Use npm dude.
I never use a built in thing to spawn my webservers
So try to use the commands I showed u, should help u.
Coz you don't want to have a project which "only works in webstorm and not in others because they dont have built in webserver support"
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:40
ok.....and which editor do u use?
yeah ....true...
Frederik Prijck
@frederikprijck
Nov 06 2016 11:40
Visual Studio Code :)
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:40
is it free?
or paid?
Frederik Prijck
@frederikprijck
Nov 06 2016 11:41
Free.
Frederik Prijck
@frederikprijck
Nov 06 2016 11:48
Is it working using lite-server @Rakesh18754 ?
Or have I been talking to myself while explaining ? :D
RakeshNerkar
@Rakesh18754
Nov 06 2016 11:50
no no.....i am just trying to figure out how to run npm install in webstorm ...will have to google abt it ....i created a new folder with packge.json name...and then will run the npm install command from cmd.....
RakeshNerkar
@Rakesh18754
Nov 06 2016 12:06
@frederikprijck HI....yups its all working fine......Thanks a lot man....
Frederik Prijck
@frederikprijck
Nov 06 2016 12:07
great !
Paolo Mangia
@paolomangiadev
Nov 06 2016 22:56
is there anyone who can help me with socket.io? :smile:
Krzysztof Bernat
@ChBernat
Nov 06 2016 23:56
@paolomangiadev sup?