I'm new to AngularJS and I'm trying to create the following structure:
& Lt; Div class = "zone" & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Button ID = "BTN 94" class = "SPAN 4 BTN" & gt; All zones & lt; / Button & gt; & Lt; Button ID = "BTN 95" class = "SPAN 4 BTN" & gt; Region 1 & lt; / Button & gt; & Lt; Button ID = "BTN 9 6" class = "SPAN 4 BTN" & gt; Zone 2 & lt; / Button & gt; & Lt; / Div & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Button id = "btn97" class = "span4 btn" & gt; Zone 3 & lt; / Button & gt; & Lt; Button id = "btn98" class = "span4 btn" & gt; Zone 4 & lt; / Button & gt; & Lt; Button ID = "BTN 99" class = "SPAN 4 BTN" & gt; Area 5 & lt; / Button & gt; & Lt; / Div & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Button id = "btn100" class = "span4 btn" & gt; Area 6 & lt; / Button & gt; & Lt; / Div & gt; & Lt; / Div & gt; In my controller I am getting the zone through reliable web service and successfully making a scope object popular.
** Admin * ZonesFactory.query (function (data) {// success handler var results type = Data.contact type; var objects = data.Scent.value = $ scope.zoneList = []; Console.log (object); if (resultTap == "list") {angular (objects, functions) {item} $ Resource (item.HRF) .Gate (function (line data) {$ scope.zoneList .push (rowData.zone);})}}}}}}, function (error) {// error handler}}; ** In HTML ** & lt; Div class = "zones" & gt; & Lt; Div class = "line-fluid" & gt; & Lt; span ng-repeat = "area in zone area" & gt; & Lt; Button ID = "{{$ index}} class =" span4btn "& gt; {{zone}} & lt; / button & gt; & lt; span ng-if =" ({{index $}}% 3) == 0 "> However, I was able to break into a new division after every three items in the list. I am faced with the following : 1. Creating a simple grid structure with div and no spans 2. How to increase an ID of BTXX (where x is a number) How to create a wind id, how can I create a grid structure using thw div, and how to increase the number part of the button ID.
You can ng-repeat on the array of numbers that display the rows, and nested to display ng-repeat use ng-if appropriate indexed button. NG-if logic can be beautiful, but you get this idea. Each button has been created with a simple interpolation of id . To match the output required in your question, just enter every $ index in 94 I add. Here's a working demo: You can change the 94 with the initial variables on your scope to ensure the specificity.
Popular posts from this blog
I'm trying to pass an input text from the viewer to the controller in the Facebook Birthday app: Link to app: In the Home Controller [FacebookAuthorize ("email", "user_photos")] Public async Tasks & lt; ActionResult & gt; Index (FacebookContext reference) {if (ModelState.IsValid) {var user = waiting for reference. Client.Gate CurrentUserAsync & lt; MyAppUser & gt; (); View return (user); } See Return ("Error"); } [Http post] [facebook authorized ("email", "user_photo")) public async task & lieutenant; Actionsclass & gt; Index (string textile, facebookcontonte context) {if (ModelState.IsValid) {var user = wait context.Client.GetCurrentUserAsync & lt; MyAppUser & gt; (); // See my code, see the use of txt here (user); } See Return ("Error"); } View: @using facebookpostc.models @ Microsoft.AspNet.Mvc.Facebook.models using @ Microsoft.AspNet.Mvc. Facebook @model MyAppUser @ {ViewB...
I have used 2 database tables and core data / NSManagedObjects in SQLite: User is user_id name group (multiple groups) Group group_id title group members (multiple users) By using core data to save a group and adding users ( Add to group) as follows: group * cordata = zero; Cordata = [NSEntityDescription insertNewObjectForEntityForName: @ Managed Object Contains in "Groups": Reference]; Request = [NSFetchRequest fetchRequestWithEntityName: @ "user"]; Request.predicate = [NSPredicate predicateWithFormat: @ "user_id =% @", user_id]; Result = [reference executeFetchRequest: request error: & amp; Error]; CoreData.group_id = group_id Cordettitle = Title [Cordata AdGroupMailersObject: [Last objections result]]; Is it right to say that core data manages a user with multiple users and groups with the code above? Yes, if the relationships are in the form of each other's inverse relationship The inverse relationships are updated automaticall...
I am calling a string with a C + code and calling from the C # code. The C ++ function is responsible for filling the string material. The following code is: C #party: var abc = new string builder (4096); // will have to change this var result = Basic methods. SignCrcFile (ABC); C ++: bool __cdecl SignCrcFile (char * abc) {... char * tempStr = "hello all"; // for example // copy it to ABC string strcpy (ABC, tempStr); Back true; } The problem is that tempStr's size in the C ++ function is dynamic (the above assignment for TempStr is only an example). In such a case, it is not a hard code that the size of ABC string is in the size of 4096 bytes on the C #. The first solution can be a solution to create 2 functions on the C ++ side to get the size of the string. Then allocate that size using StringBuilder in the C # side then use the next function to bring the entire string from C ++ to the C #. But no suggestion this may not be the most optimal way? ...
Comments
Post a Comment