search

Home  >  Q&A  >  body text

angular.js - Does angularjs have a dictionary template? Are those drop-down selections written as a command, get a dictionary, and then use this command in the select tag in the future?

Does angularjs have a dictionary template? Just write those drop-down boxes as a command, get a dictionary, and then use this command to replace the select tag in the future. There is no need to write the select options data in js?

Know how to share. Share a code framework for this function! !

Requirement: There is a file dedicated to storing dictionary data. Then, the attribute of the command can read one of the data in this file, and then it can be read out in the drop-down box...

Similar to this code pattern:
<dict:select defaultValue="true" name="GJ" id="GJ" dictName="GJ" cssClass="form-control"/>

Purpose: centralized management, code reuse.

Does anyone know? Does anyone know?

大家讲道理大家讲道理2775 days ago520

reply all(1)I'll reply

  • PHP中文网

    PHP中文网2017-05-15 17:04:28

    It is recommended that you learn directive. When you know how to write it, you can write how you want, and your ability has improved. Otherwise, you should ask for help next time if you have other needs. https://docs.angularjs.org/guide/directive

    reply
    0
  • Cancelreply