|
Speaking of the application cache, when you use that, does your application just give up on network calls altogether? That's what mine's doing. I haven't read anything to lead me to believe this is how it's supposed to work, so I think I'm doing something stupid or am misunderstanding something. See screenshot below from my application. It will just not grab anything over the network. (Facebook login for example) Here's my appcache manifest. Maybe I just need to read more. I've looked at everything I could find on MDN, HTML5Rocks, and appcachefacts.info.
|
# ¿ Jan 30, 2014 16:34 |
|
|
# ¿ May 4, 2024 16:40 |
|
an skeleton posted:AngularJS question ahead: Angular newbie here, but I do something like this in one of my apps. Here's what I do in my controller: code:
code:
It's not much different if you're simply validating. Just replace what's in canSave with your own validation logic. Of course, this assumes your textbox is ng-model-bound. Sounds like it should be. glompix fucked around with this message at 20:41 on Jan 31, 2014 |
# ¿ Jan 31, 2014 20:33 |
|
an skeleton posted:I may be misunderstanding the solutions offered, but I don't think either of those help me. I need to be able to disable a save button, without access to form names, or at least I am finding it very difficult to find the form names. I have an angular foreach() function going through each row, and I tried to check if the forms are valid by seeing if getElementsByClassName('ng-invalid') had an index of >-1, but I can't figure out how to find the element name to check for it. So I am thoroughly confused right now. Can you post some of your code? In my experience, Angular and other MV* frameworks are very good about making it so you don't have to reach into the DOM by hand to do stuff like that.
|
# ¿ Feb 3, 2014 18:13 |
|
Skiant posted:Get all your controllers and services in one single file, using automation tools like gulp-concat, gulp-ng-annotate and then gulp-uglify For my last project I just decided I want to do whatever angular-fullstack is doing. Still haven't learned how every little thing works but all the injection/bower-related work it does is priceless.
|
# ¿ Oct 3, 2014 21:12 |
|
caiman posted:So are CRUD operations common in an average Angular application? Or is that not what it's intended for? If you want to dive in new backends a bit, get Yeoman and generate an app using angular-fullstack. It has an Express backend that talks to a MongoDB database. It's kind of the Javascript hipster equivalent to a php/mysql server. You can use other backends like PHP or ASP.NET, but this is stack is pretty popular nowadays. With a NoSQL database like Mongo the idea is that your JSON document is your datarow and your primary key is a GUID. You could certainly go with a relational model and put together JSON from the result of a SQL query if your app benefits from that kind of system. For many apps it simply doesn't matter and you just want to store some poo poo on a server and don't want to deal with managing schema or other bullshit.
|
# ¿ Jan 10, 2015 09:04 |
|
|
# ¿ May 4, 2024 16:40 |
|
pigdog posted:Which is why every Angular guide and official documentation strongly encourages using array syntax which doesn't break. There's even a grunt task that will change it to use the array syntax before minification, so you if you use that you don't even have to worry about it.
|
# ¿ Jan 11, 2015 22:59 |