Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/81.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angularjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 单击第页上的选择写入_Html_Angularjs_Angular Material - Fatal编程技术网

Html 单击第页上的选择写入

Html 单击第页上的选择写入,html,angularjs,angular-material,Html,Angularjs,Angular Material,我在建一个网站,我用的是有棱角的材料。 我有一个带有此代码的select标记: <md-select ng-model="year"> <md-option><em></em></md-option> <md-option ng-repeat="n in [] | rangeYear" value="{{$index+startYear}}"> {{$index+startYear}}

我在建一个网站,我用的是有棱角的材料。 我有一个带有此代码的select标记:

<md-select ng-model="year">
    <md-option><em></em></md-option>
    <md-option ng-repeat="n in [] | rangeYear" value="{{$index+startYear}}">
        {{$index+startYear}}
    </md-option>
</md-select>

{{$index+startYear}
“startYear”和“year”是范围中的字段。年份代码:

app.filter('rangeYear', function () {
    return function (input) {
        var years = [];

        for (var i = 1924; i <= new Date().getFullYear(); i += 1) {
            years.push(i);
        }
        return years;
    }
});
app.filter('rangeYear',函数(){
返回函数(输入){
风险值年数=[];

对于(var i=1924;我可以为我们提供一个项目的工作示例吗?它不在服务器上,它是本地化的,很难理解为什么它在没有我们可以查看的东西的情况下编写此文件…我在github上有我的项目。它会有帮助吗?请修复
警告:尝试多次加载angularjs。
通过删除重复的angularjs库importt、 这可能是一个可能的原因。删除后请告诉我。您能提供您项目的工作示例吗?它不在服务器上,它是本地化的。很难理解为什么它在没有我们可以查看的东西的情况下编写此文件…我在github上有我的项目。它会有帮助吗?请修复
警告:尝试多次加载angular。
by正在删除重复的angularjs库导入。这可能是一个原因。请在删除时通知我。