Collection Repeat without full Ionic Bundle - javascript

I would love to be able to use Ionic's collect-repeat directive, however the entire Ionic bundle is not suitable for the solution I am developing.
I am trying to strip the code I need to implement it in a web app, however it's looking like an awful lot of code to get one directive working.
Has anyone come across a similar solution without using Ionic or has successfully implemented collect-repeat from Ionic without using the entire bundle?
Any advice would be great!
Thanks

Related

How to migrate html, css and javascript application into react-native components?

I've created a web application using HTML, CSS and Javascript but is it possible to convert it to a react-native app with the help of any kind of wrapper for HTML, CSS and JS code which can be used within react-native. I would like to convert the web application component into react-native components though it would be a tedious process if I need to change anything in the web application which in turn lead me to change the react-native components.
You cannot use html,css,and javascript code for react native app. Beacause react native has its own tags so it wouldn't possible but still if you can follow the attached url hope it may give you ideas
https://medium.com/javascript-in-plain-english/how-to-convert-any-web-page-to-reactjs-9740f1ba15db
a method would be...
react-native-WebView? I haven't tried it out but from what it sounds like I think its like android web view where u can give it a link and it will load that webpage? that's the closest thing I can think of. of course this method has limitations obviously...
I don't think there are any good methods to turn react code to react-native code since both have different tags and even if you do somehow do it you will have to climb mountains of bugs and fixes if your app is kind of complex.
but if in the future u do take up a project that is for both web and native, and they both share a load of functionality I would recommend something like react-native-web where you can share a codebase between web and native. essentially by making a native app ur making a web app aswell. its a bit tricky when u start but if your having projects like this it will be helpful. hope this gives u some ideas

jquery datatables from datatables builder into react component

I've been trying to get jQuery datatables to work in a react component. My app doesn't use bootstrap but I want to use it for my tables so I've scoped bootstrap to a class so i can use it in a div without affecting the rest of the application.
I read the following article Integrating React and Datatables — not as hard as advertised, but the article presents a use case that is more basic than I think many jQuery datatables users use. npm datatables doesn't give you access to extensions (search, scroller, button functions, etc), and everything that comes without the extensions is easy enough that you might as well use an existing react table like primereact, react-table, griddle, react-data-grid, reactabular, fixed-data-table, or react-virtualized.
These offer many options but when tested, had at least 1 or more problems that prevented it from being easily adopted and use all the features needed. Some have issues i think I could help fix after I'm more seasoned with react, but I'm not there yet. I've used jQuery datatables in many production environments without any problems. It's a major sticking point moving to react.
So after weeks of searching and testing and trying to work through bugs, I'm back to trying to bring jQuery datatables into my react app. I realize it's not the "react way" but based on the react docs it's possible and there's a proper way to approach it. I don't need it to react with anything outside of its container or div i place it in.
Using the builder is the recommended way to download datatables so you can get your customized components. I'm also downloading rather than using the CDN because this is a local app and needs to work when there is LAN but no WAN access. I'm using create-react-app and I tried to download datatables from here to a folder in my project and had the following problems:
hot-reload started taking forever (>1min)
the page itself was moving at a crawl
extensions didn't seem to be working (could have been locked up?)
How do you use jQuery datatables in a react app while still being able to use the datatables extensions and without killing the hot-reload for create-react-app? Can anyone provide a working example?
Update
Apparently jQuery datatables has made some major updates since the last time I tried to use their builder and now it includes a way to npm install the extensions too. I'll post a github of a working solution if i find one before someone else can update.
Update
Here is a github i made of a react version that is partially working and a basic html/js/css version that is fully working. The readme tells what is working and not working. Can anyone show me why this not working properly?

How to handle multi-page website using angularjs?

I want to create an android application using Cordova, and I am using angularjs to fetch and handle data from the service end-point of a Drupal website. Initially I tried to use ngRoute of Angularjs but didn't seem to fit properly, so I turned to 'ui-route'. But I facing problems with ui-route as well.
My main aim is to use a particular view/template for multiple pages. I am new to Angularjs, so kindly help me choose the best way to proceed. My main question is how to handle multiple pages, can we just have each page as separate html file and link them or use routing. I tried to look into many tutorials but nothing helped me. Even giving an example would be enough.
I understand your problem. You can achieve this via $stateProvider but you don't know how. I am giving you a application link there you can see how to use $state.
kitchensink
download this application.
if you want to reuse your template then use custom directive and see this or more info angular

can i use ionic components without ionic for a website?

i've used and loved ionic in many mobile apps, but now as i'm building a web client for my app, i understand that ionic was not meant for desktop apps but my question is can i use its component in a regular angularjs - bootstrap 3 website ?
components i'm after are mostly the
pull to refresh and infinite scroll.
swipe list to show option buttons.
modals
i tried to start a new ionic project and add my custom css and js and just copy out www content
ionic start blank
but faced a problem as ionic keep changing my dom, and applying its own css that override mine. so i only want to extract the components and use regular angularjs.
is it possible ?
It is possible, as ionic is just AngularJS directives, optimized for mobile.
It had an easy way to add cordova items (ngCordova) but if you don't need those components and whish to build only a Browser project, just don't had that js file.
Even more, by doing ionic serve, you are indeed running your project into your browser.
Concerning your CSS issue, better paste your code into a codepen or jsfiddle to let us understand your issue.

Using external libraries

I'd like to build a chrome extension in angular using AngularJS which interacts with Twitter.
I have some experience in integrating twitter with node.js but far less when it comes to angular only.
I'd like to use OAuth.js to connect to twitter (http://oauth.googlecode.com/svn/code/javascript/) and therefore I was wondering how to integrate this with Angular?
Do I need to build a provider and rewrite all the function I need from OAuth.js or is there any quick way to do it?
Many thanks
You can use ng oauth plugins that other people wrote like these:
enginous/angular-oauth:
https://github.com/enginous/angular-oauth
andreareginato/ng-oauth:
https://github.com/andreareginato/ng-oauth
I haven't used them myself, but documentation seems straight forward.

Categories