首页 > 解决方案 > 开始角

问题描述

初学者 Angular,我无法得到我想要的东西,我首先展示我的条目:

{"composants" : [
    {"typeCarte" : "type1", "direction":"0", "fortmats":"jpeg;png;gif"},
    {"typeCarte" : "type1", "direction":"1", "fortmats":"jpeg;png;gif"},
    {"typeCarte" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
    {"typeCarte" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
    {"typeCarte" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
    {"typeCarte" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
    {"typeCarte" : "type1", "direction":"0", "fortmats":"jpeg;png;gif"},
    {"typeCarte" : "type1", "direction":"1", "fortmats":"jpeg;png;gif"}
]}

注意:这代表 3 个卡:2 个类型 1(2 个端口)和 1 个类型 2

有了这种条目,我想用卡片创建这个表格,显示这种风格:

    Configuration :
        Insert :

            Carte 1
            'checkbox' Port0    'checkbox' Port1 (disable)

            Carte 2
            'checkbox' Port2    'checkbox' Port3    'checkbox' Port4    'checkbox' Port5

            Carte 3
            'checkbox' Port6    'checkbox' Port7 (disable)


        Extract :

            Carte 1
            'checkbox' Port0 (disable)   'checkbox' Port1

            Carte 2
            'checkbox' Port2    'checkbox' Port3    'checkbox' Port4    'checkbox' Port5

            Carte 3
            'checkbox' Port6 (disable)    'checkbox' Port7 

标签: angularfiltersql-order-by

解决方案


否则,为了得到一些帮助,我也做了翻译:

      I am starting with angular, and I have some difficulties with it :-/ I'll first present yous my data :

        {"cardType" : "type1", "direction":"0", "fortmats":"jpeg;png;gif"},
        {"cardType" : "type1", "direction":"1", "fortmats":"jpeg;png;gif"},
        {"cardType" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
        {"cardType" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
        {"cardType" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
        {"cardType" : "type2", "direction":"2", "fortmats":"jpeg;bmp;png;gif"},
        {"cardType" : "type1", "direction":"0", "fortmats":"jpeg;png;gif"},
        {"cardType" : "type1", "direction":"1", "fortmats":"jpeg;png;gif"}
    ]}

    NB : Cela représente 3 cartes, 2 de type 1 (2 ports), et 1 de type 2
    NB : These are 3 cards, 2 of the first type (2 ports) and 1 of the first one.

    With this kind of inputs, I would like to create this formular with this style, by cards :

    Configuration :
        Insert :

            Card 1
            'checkbox' Port0    'checkbox' Port1 (disable)

            Card 2
            'checkbox' Port2    'checkbox' Port3    'checkbox' Port4    'checkbox' Port5

            Card 3
            'checkbox' Port6    'checkbox' Port7 (disable)


        Extract :

            Card 1
            'checkbox' Port0 (disable)   'checkbox' Port1

            Card 2
            'checkbox' Port2    'checkbox' Port3    'checkbox' Port4    'checkbox' Port5

            Card 3
            'checkbox' Port6 (disable)    'checkbox' Port7 

    I need to detect/separate the differents cards (a priori : type1's cards = 2 ports ; type2's port = 4 ports)
    I need to propose only one case maximum in the insert part and two maximum in the extract part.

    And I need help with Angular : filters, filters creations... working with the controller ?

推荐阅读