This is one of the presentations from the February 2014 DFW Area AngularJS Meetup. Introduction on how to use AngularJS Services and Directives to handle ...
hi Jim Lavin am Umesh
i am trying to do same as you but am getting error that Undefined is not a
function. that function is 'isMobile()' so please give me some
suggestion..please
If you are using the latest code from the GitHub repository, isMobile no longer exists. The new methods are isXs, isSm, isMd and isLg. Look at the source file responsive-directive.js to see the size breaks. Hope that helps.
I use WebStorm. It does a great job for JavaScript projects.
Use ngStorage For All Your AngularJS Local Storage Needs
Use ngStorage in your AngularJS project to avoid having to serialize and unserialize your object data for saving and loading. View a written version of this ...
+Nic Raboy I am using PHP chat application with websocket. When I use websocket I failed to get SESSION values. And I came to know about this just yesterday. So I stored PHP SESSION variable in ngStorage as you taught. And now trying to use that in websocket. Thank you for fast response.
+Tashi Paljor I am not a PHP pro, but I think $_SESSION is a server session, not to be confused with browser local storage. I'll let others respond with better answers.
+nikolai ganovski ngStorage is a wrapper for local storage. Depending on how you're trying to use it, it should show up the next time you visit a page.
+thedethawk You would loop through it just as you would any other array of objects.I assume you would have something like:myObj = [{name: "Nic"}, {name: "Maria"}]$localStorage.myObj = myObj;$scope.myObj = $localStorage.myObjThen you would do something like this in one of your views:ng-repeat="obj in myObj"{{obj.name}}Hopefully that makes better sense.Regards,
Angular Tutorials for Beginners - Part 8 - How to Use AngularJS in IDE Projects
Get the full 40+ Hour “Become a Kick Ass Web Developer” course here: //streamskill.com/courses/become-a-kickass-web-developer During AngularJS ...
When to use AngularJS inherit scope directive | Pluralsight
When to use AngularJS inherit scope directive | //www.pluralsight.com/courses/angularjs-directive-fundamentals In this clip, Joe Eames goes over when you ...
How to use Framework7 with AngularJS
A tutorial how to use Framework7 with AngularJS Links: - Template Download: https://github.com/valnub/Framework7-Pure-Angular-Template - My Blog: ...
Hi Timo, thanks for tutorial. In this example you use local json file. How
i do to use json from wordpress site? like
//www.araminoticias.com.ar/api/get_recent_posts/. Any idea? Thanks
+Gastón Coroleu Your link gives me a 404, so I cannot check it but I noticed that your JSON result looks a whole lot different to what I used in my example, so you need to change result.data.movies to what ever you want to get from that JSON file. Also, you probably have to fix the data binding expressions in your HTML in order to target the right data attributes.
+Timo Ernst Hi Timo, thanks for your answer. I change the code with your suggest in 2 files:DataService.jspub.getMovies = function () { return $http.jsonp('//www.araminoticias.com.ar/api/get_recent_posts/?page=1&callback=JSON_CALLBACK'); };IndexPageController.js InitService.addEventListener('ready', function () { DataService.getMovies('//www.araminoticias.com.ar/api/get_recent_posts/?page=1&callback=JSON_CALLBACK').then(function (result) { console.log(result.data.movies); $scope.movies = result.data.movies; }, function (err) { console.error(err); }); });But doesnt work. I upload the demo here: //codigomasivo.com.ar/dev/wpapp2/Thanks again.
+Gastón Coroleu You need to make sure that your app is hosted on the same domain as the web service. If it is not, cross domain calls are not possible. In this case you need to use CORS or JSONP. Both must be supported by your service provider.//enable-cors.orghttps://en.wikipedia.org/wiki/JSONPIf you opt for JSONP, you will have to replace $http.get() with $http.jsonp()
AngularJS Factory vs. Service
When or why to use a factory or a service... or a constant... or a value... =========================================== **Like what you saw? Be sure to ...
This is what a beginner hears when he listens to this tutorial: the factory
is a provider is a service is a factory is a provider is a factory is a
service
+Visweshwar Ganesh Hi, getting some initial parameters from the server at startup is always a good idea (as long as people can't put a breakpoint there and change it out which is always a possibility with JavaScript). Later today I'll post a video of how I build up an application. It feels easy enough to be solid
+Carlos Kelkboom Hi Carlos.. What I went about doing was having one main.js with the appName parameterized. The appName [which holds the parent module for the page] came in from the backendTier which supports the UI. Is that a valid impl.
+Visweshwar Ganesh The way I do it is that I put every module in a folder. Each folder will have a module.js file in the root where I register this module with angular. Each module file has an initializer from where I run my config phase and my run phase. Once I get a few hours I will make a video of this process, but until then, if you have any questions, just post them here and I'll try and answer them as best as I can.
+Carlos Kelkboom I have two modules navApp and routeApp and they are not dependent. I structured my file and dependency just like above. Still i'm getting an error cannot read module. Can you please suggest what could be wrong?
+JIMSTER305 Thank you for your comment. The next tutorials are also up. They go into more detail and will....eventually lead to a full application using AngularJS, RequireJS and NodeJS
I would not register them in the require config file. I would create a separate initialization file which does this. If I have some time I'll create a video on this.
Angular Tutorials for Beginners - Part 3 - How to Use AngularJS Controllers - Part 1
Get the full 40+ hour "Become a Kick Ass Web Developer" course here: //streamskill.com/courses/become-a-kickass-web-developer During this video, ...