ps: I have two suggestions: 1. Boy, this is the same principle as event delegation. If you don’t have basic js skills, don’t blindly pursue any new framework, just make up for the basics. 2. Teenagers, develop good programming habits. Use button labels for buttons instead of span. Although bootstrap handles all the styling for you, this is a very poor programming habit.
If you don’t use that solution, you can write this pair of codes as a loop. In this redundant code, you can see the corresponding relationship You can define an object literal:
Bind ng-click to p in the outer layer and pass in the $event object that comes with angular.
Controller receives $event. In $event, you can use the target object to determine which button is clicked
ps: I have two suggestions:
1. Boy, this is the same principle as event delegation. If you don’t have basic js skills, don’t blindly pursue any new framework, just make up for the basics.
2. Teenagers, develop good programming habits. Use button labels for buttons instead of span. Although bootstrap handles all the styling for you, this is a very poor programming habit.
Use uib-btn-radio
http://angular-ui.github.io/b...
NG built-in mini version of jq.
If you don’t use that solution, you can write this pair of codes as a loop. In this redundant code, you can see the corresponding relationship
You can define an object literal:
What are your needs?