I want to build Magento store with Angular-Js for that I have read so many article on net and check stack overflow questions but I am not getting up to the mark answer so I decided to ask with my own problem.
For ex: I want to use Angular-Js in Magento for list page(category page) for that what I need to change and where?In which file I need to add angular controller , model , route and all stuff related angular? If any one is there who has used Angular with Magento before please help me to clear my problem.
I think we need to change core Magento controller files may be but not sure.
Thanks in advance.
Related
I am working on a project that uses Angular1, we hit the problem where when we change an html template the users will not see the change until a hard refresh is performed. Ideal would be to have the cache service to check a timestamp and invalidate the cached file. As an example now I edited a template used by the $stateProvider.
My questions is what solutions or best practices are used to solve the problem?
P.S since our JS files are combined in 1 file we fixed the problem there by appending a timestamp in the script tag from our PHP backend
Interesting question! We've had the same issue in a project that uses Angular1.x. We solved it using angular-cache-buster.
It basically helps you put a httpInterceptor. All you need is have ngCacheBuster in module dependency injection, and inject httpRequestInterceptorCacheBusterProvider in the .config of your app to set the match list.
For example,
httpRequestInterceptorCacheBusterProvider.setMatchlist([/.*api.*/], true);
this tells it to cache everything except REST api requests. You can learn more about the configuration here.
this is my firs question here but Ive been trying to find a solution these days. Im building a multi-page website and Id like to use angular for front-end. Ive seen most of the people have the issue of combining the angular syntax with laravels but Id really like to know if its possible to include angular into one of laravels views without having to re-route to an angular.html page from angular directory.
Basically I want to know if theres a way to use angular directly into "Route::get('test', 'Controller#getTest')"
The problem is that when I set the response on the controller page( return view('pages.test')->with(array('1' => $1, '2' => $2)); ) the angular scope method gets the data as a whole and its hard to target the array 1 for example to use it in my AngularController
Hope this makes sense.... THanks in advance!
Starting with a website build with AngularJS as frontend and a ReST API set as backend. I would like to append an online help content.
Does exist a project or a framework to do that quickly (using angularjs powerfull) ?
I have no special mandatory requirements. I think that two concept could be important:
help section representation as a tree,
quick link between webapplication and online help.
JHipser may be the one you need.
I finally decided to build it without additional framework:
a flat json file that describe the structure and contents of my online help,
a controller with $http.get(...) embedded to get back the content
a dedicated help page : I re-use the bootstrap help menu and I use the ng-repeat directive to show the active content.
(Anyway Thanks #Shaojiang Cai for your suggest).
Angular js is new in market so is there any advantage of using angular js with magento ?
If yes then anyone knows how can we use both in a single project ?
Angular is not new in the market, it´s pretty old already. Anyway, the benefit of using Angular (or another client framework) is that your shop can be a lot faster - instead of a page refresh for every click, you can load data/templates with Angular. For example, with a REST API. Meaning: you only load what you need and the server can handle more users.
There are many resources about this topic already, here´s a small list:
https://github.com/Wildhoney/Magento-on-Angular
http://www.webspeaks.in/2014/03/integrating-angular-js-with-magento.html
https://firebearstudio.com/blog/moa-magento-on-angular.html
http://www.neevtech.com/blog/2013/04/12/lightning-fast-magento-store-with-json-angularjs-and-magento-j-a-m/
https://www.reddit.com/r/Magento/comments/33mcgq/we_did_it_we_converted_our_magento_site_to_a/
Read through all those links and you will know why it´s good and how it can be done.
I am facing lot of problem in while using more than 1 file uploader in single page. There is any directive for this? because I didn't find it. By the way I am using Bruno Angularjs uploader Directive and tried to change multiple but getting problem while form submitting beacause all uploaders sharing same model so thats why I was not able to get all the values at a time only one can be access.
So if anyone have some solution or suggestion for this, please share with me.
There is a good jquery ajax uploader which is available in angualar js version also.
Please check here http://blueimp.github.io/jQuery-File-Upload/angularjs.html