AngularJS在使用物化轮播时出现问题

时间:2017-10-28 22:41:31

标签: javascript angularjs angularjs-ng-repeat materialize phonegap

我有一个使用angularJs制作的移动应用程序并实现了css。

它使用API​​显示数据并且包含电话间隙。

我正在用这个应用程序解决我的主要问题。如果你们中的任何人帮助我,我会感谢你们。

当我在app中使用此代码时,其负载但未显示在

<div class="card" ng-repeat="x in campList">
    <div class="card-image waves-effect waves-block waves-light">
        <img class=" materialboxed" src="my-api-source-link/images/slider/{{x.myphoto}}">
    </div>
</div>

并且有证据表明它在浏览器中加载

此照片&gt;&gt;

enter image description here

当我使用时没有实现旋转木马,它的装载和显示。

#include <iostream>
#include <string>

using namespace std;
string postfix; //infix and postfix strings

//function to return true if a character is an operation
bool isoperator(char a)
{
    if(a == '(' ||  ')' || '*' || '/' || '+' || '-') //might need to 
change to "" instead of ''
    {
        return(true);
    }
    else
    {
        return(false);
    }
}

//node class
class node
{
public:
    char character;
    //double number;
    int level; //to check for precedence of operations
    node *ptr;
    void assignlevel()
    {
        switch(character)
        {
            case ')':
                level = 3;
                break;
            case '(':
                level = 0;
                break;
            case '+':
                level = 1;
                break;
            case '-':
                level = 1;
                break;
            case '*':
                level = 2;
                break;
            case '/':
                level = 2;
                break;
            default:
                level = 0;
        }
}
friend class stack;
};

//stack class
class stack
{
public:
    node *top, *temp;

//Constructor Function
stack()
{
    top = new node;
    top->character = '&';
    top->ptr = NULL;
    top->level = 0;
    temp = new node;
    temp->ptr = NULL;
}

//Empty
bool empty()
{
    return(top->character == '&');
}

//Read character from string
void readchar(char a)
{
    temp->character = a;
    temp->assignlevel();
}

//Check Precedence of top and temp
bool precedence()
{
    return(top->level >= temp->level);
}

//Push function for infix to postfix
void push1(char a)
{
    readchar(a);
    if(isoperator(temp->character)) //Push onto stack if character is an operation
    {
        if(empty())
        {
            top->character = temp->character;
            top->assignlevel();
        }
        else
        {
            node *v = new node;
            v->character = temp->character;
            v->level = temp->level;
            v->ptr = top;
            top = v;
            delete v;
        }
    }
    else //append to string if character is number
    {
        postfix += temp->character;
    }

    if(precedence()) //we check if we have to pop every time we push 
onto the stack
        {
            pop1();
        }
    }

    void pop1() //Pop onto postfix string
    {
        postfix += top->character;
        node *w = top->ptr;
        delete &top;
        top = w;
        delete w;
    }
};

int main()
{
    string infix = "2+3-5*(7+1)";
    stack op;
    for(int i = 0; i < infix.size(); ++i)
    {
        op.push1(infix[i]);
    }


    for(int j = 0; j < infix.size(); j++)
    {
        cout << postfix[j];
    }
    return 0;
}
  • myphoto标签(或东西)来自json数据。
  • 项目有控制器和.tpl文件。一切正常,但我有这个问题
  • 这是我的第一个angularjs项目。很少解释会帮助我很多

0 个答案:

没有答案