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;
                            });
                    });
  • 相关阅读:
    background-size ie8及以下不兼容的解决方案
    前端
    JavaScript ES(6-11)
    前端工程化
    前端安全漏洞与防范
    Vue源码思维导图
    项目流程总结
    typescript版数据结构与算法库
    tsconfig.json各项配置注解
    Sql server动态加载存储过程--分页
  • 原文地址:https://www.cnblogs.com/thlzhf/p/3992288.html
Copyright © 2011-2022 走看看