首页 > 代码库 > ng-template

ng-template

一,锚点链接

定义锚点:

                    <a href="#login" class="btn btn-primary">Login</a>
                    <a href="#about" class="btn btn-success">About</a>

二,定义ng-template:

                    <script id="login.html" type="text/ng-template">
                        <form action="">
                            <legend>
                                <caption>{{loginTitle}}</caption>
                            </legend>
                            <div class="form-group">
                                <label class="control-label" for="userName">UserName</label>
                                <input id="userName" type="text" class="form-control">
                            </div>
                            <div class="form-group">
                                <label class="control-label" for="userName">passWord</label>
                                <input id="passWord" type="text" class="form-control">
                            </div>
                            <p>
                                <button type="submit" class="btn btn-danger">提交</button>
                            </p>
                        </form>
                    </script>

 

ng-template