zoukankan      html  css  js  c++  java
  • javascript权威指南(1)

    javascript常用知识点:

    http://www.cnblogs.com/pingfan1990/p/4309223.html

    Function.prototype.bind()
    Function.prototype.call()
    Function.prototype.apply()

    call and apply call a function while bind creates a function. Though with call() you pass arguments individually and apply() as an argument array. 

    https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind

    var app = angular.module("Demo", ["ngRoute"])
                    .config(function ($routeProvider, $locationProvider) {
                        $routeProvider
                            .when("/home", {
                                templateUrl: "Templates/home.html",
                                controller: "homeController"
                            })
                            .when("/courses", {
                                templateUrl: "Templates/courses.html",
                                controller: "coursesController"
                            })
                            .when("/students", {
                                templateUrl: "Templates/students.html",
                                controller: "studentsController"
                            })
                            .otherwise({
                                redirectTo: "/home"
                            });
                         $locationProvider.html5Mode(true);
                    })
                    .constroller("homeController", function ($scope) {
                        $scope.messsage = "Home Page";
                    })
                    .constroller("coursesController", function ($scope) {
                        $scope.courses = ["C#", "VB.NET"];
                    })
                    .constroller("studentsController", function ($scope, $http) {
                        $http.get("StudentService.asmx/GetAllStudents")
                            .then(function (response) {
                                $scope.students = response.data;
                            });
                    });
  • 相关阅读:
    I'm Telling the Truth
    B-shaass and lights codeForces
    1
    不容易系列之(4)——考新郎 HDU
    犯人冲突
    不互质的和
    OI回忆录
    NOI2018退役记
    uoj221【NOI2016】循环之美
    uoj220【NOI2016】网格
  • 原文地址:https://www.cnblogs.com/thlzhf/p/3992288.html
Copyright © 2011-2022 走看看