retieving directive data in controller

42 views
Skip to first unread message

Jonathan Price

unread,
Sep 2, 2014, 9:44:53 PM9/2/14
to ang...@googlegroups.com
Here's a plunkr to show what I'm after:


Works, except for the last step. Basically, it's a few categories with options under each that are toggleable (by clicking them) between three states.  inactive (grey), active (green), active false (red).  Right now, this works.  You can hit each category and set the state of each line by clicking.

I need a way to update the textarea with the values from the individual shorcutFull directives, but since I'm super new, I'm not sure how to do it.  Or the best way.  Any help would be very appreciated.

Also, is there a better way to do the toggleShortcut function in the shortcutFull directive?  That if statement seems pretty hacky.

Thanks.

Peter Bernhardt

unread,
Sep 3, 2014, 7:58:23 AM9/3/14
to ang...@googlegroups.com
You haven't bound the model in the textarea control. But have you looked at bootstrapUI's Tab directive? See http://angular-ui.github.io/bootstrap/

Puritan Paul

unread,
Sep 3, 2014, 3:46:50 PM9/3/14
to ang...@googlegroups.com
I hadn’t figured out how to get info from the directive controller back to the main controller, but I found a way last night.  I’m new with this, so I’m really just hoping to not write crappy code.  I’ve updated the plunker, and would love any suggestions/warnings about what I’m doing.   I also understand that everyone has their own work to do.


I’ll definitely look into that ui.  Looks great.  Thanks for the suggestion.



--
You received this message because you are subscribed to a topic in the Google Groups "AngularJS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/angular/yGNAkrc26C0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.

Puritan Paul

unread,
Sep 3, 2014, 9:26:53 PM9/3/14
to ang...@googlegroups.com
How customizable are those tabs in the bootstrap UI?  Like, is it difficult to change the height of them?  Or the text and rollover colors?


On Sep 3, 2014, at 4:58 AM, Peter Bernhardt <peter.b...@gmail.com> wrote:

Sander Elias

unread,
Sep 4, 2014, 9:34:11 AM9/4/14
to ang...@googlegroups.com
Hi Jonathan,

Is it something like this you are trying to do? http://plnkr.co/edit/OmGTbvEx9b2zxQfhCOTM?p=preview

Regards
Sander
Reply all
Reply to author
Forward
0 new messages