Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
241 views
in Technique[技术] by (71.8m points)

angular 报错

index,html

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="angularJs/angular.js"></script>
    <script src="angularJs/angular-route.js"></script>
    <link rel="stylesheet" href="semantic.min.css">
    <link rel="stylesheet" href="index.css">
</head>

<body ng-app="wyyapp">
    <div id="head">
        <div class="logo">
            <img src="img/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90_%E8%87%AA%E5%88%B6.png">
            <span>网易云音乐</span>
        </div>
    </div>
    <div id="leftNav">
        <div class="ui vertical menu">
            <div class="item">
                <div class="header">推荐</div>
                <div class="menu">
                    <a class="item" href="#/findMusic">发现音乐</a>
                    <a class="item">私人FM</a>
                    <a class="item">MV</a>
                    <a class="item">朋友</a>
                </div>
            </div>
            <div class="item">
                <div class="header">我的音乐</div>
                <div class="menu">
                    <a class="item">本地音乐</a>
                    <a class="item">下载管理</a>
                    <a class="item">我的音乐云盒</a>
                    <a class="item">我的歌手</a>
                </div>
            </div>
            <div class="item">
                <div class="header">Hosting</div>
                <div class="menu">
                    <a class="item">Shared</a>
                    <a class="item">Dedicated</a>
                </div>
            </div>
            <div class="item">
                <div class="header">创建的歌单</div>
            </div>
            <div class="item">
                <div class="header">我的歌单</div>
                <div class="menu">
                    <a class="item">E-mail Support</a>
                    <a class="item">FAQs</a>
                </div>
            </div>
        </div>
    </div>
    <div id="content" ng-view>

    </div>
</body>

</html>

app.js

var app = angular.module('wyyapp', ['ngRoute']);
app.config(['$routeProvider', function ($routeProvider) {
    $routeProvider.when('/findMusic', {
        template: 'aaaaaa'
    })
}])

clipboard.png


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

你这样截图问题就很清晰了,ng-app="wyyapp"改为ng-app="app"就可以了


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...