草庐IT

angular2-social-login

全部标签

html - Angular 2 表单验证错误 "Unhandled Promise rejection: Cannot assign to a reference or variable!"

App.component.htmlFormValidationNameNameisrequiredNamemustbeatleast4characterslongNamecannotbemorethan20characterslongSubmit//...(Samethingsforusername,emailandpassword)App.component.tsimport{Component}from'@angular/core';@Component({selector:'app-root',templateUrl:'./app.component.html',styleUr

html - Angular 2 表单验证错误 "Unhandled Promise rejection: Cannot assign to a reference or variable!"

App.component.htmlFormValidationNameNameisrequiredNamemustbeatleast4characterslongNamecannotbemorethan20characterslongSubmit//...(Samethingsforusername,emailandpassword)App.component.tsimport{Component}from'@angular/core';@Component({selector:'app-root',templateUrl:'./app.component.html',styleUr

javascript - 在 Angular ng-switch 中使用 html 模板

我正在制作一个随着用户点击而移动的“交互式菜单”。我想知道是否有办法在ng-switch中包含html模板,由于每个“开关”中的所有逻辑都不同-这将导致巨大的html文件。12 最佳答案 使用ngInclude:注意:如果您对路径进行硬编码,请不要忘记使用包含在双引号内的单引号。 关于javascript-在Angularng-switch中使用html模板,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.c

javascript - 在 Angular ng-switch 中使用 html 模板

我正在制作一个随着用户点击而移动的“交互式菜单”。我想知道是否有办法在ng-switch中包含html模板,由于每个“开关”中的所有逻辑都不同-这将导致巨大的html文件。12 最佳答案 使用ngInclude:注意:如果您对路径进行硬编码,请不要忘记使用包含在双引号内的单引号。 关于javascript-在Angularng-switch中使用html模板,我们在StackOverflow上找到一个类似的问题: https://stackoverflow.c

javascript - 部分静态路由参数angular 2

是否可以在Angular2路由中使用部分静态参数?我要解释:现在我使用这样的经典参数:constroutes:Routes=[{path:':type/fine.html',pathMatch:'full',redirectTo:':type/fine'}但我可以使用这样的东西:constroutes:Routes=[{path:'static-:type/fine.html',pathMatch:'full',redirectTo:'static-:type/fine'}能够准确地重定向到static-{{parameterValue}}/fine。这可能吗?

javascript - 部分静态路由参数angular 2

是否可以在Angular2路由中使用部分静态参数?我要解释:现在我使用这样的经典参数:constroutes:Routes=[{path:':type/fine.html',pathMatch:'full',redirectTo:':type/fine'}但我可以使用这样的东西:constroutes:Routes=[{path:'static-:type/fine.html',pathMatch:'full',redirectTo:'static-:type/fine'}能够准确地重定向到static-{{parameterValue}}/fine。这可能吗?

javascript - Angular2 - md-slide-toggle 显示错误的值

我的问题是md-slide-toggle的值正确,但显示错误。例如:开始时值为1,切换处于事件状态。按下开关的时间:值为0但开关仍处于事件状态。按下开关的时间:值为1,但现在开关现在处于非事件状态。...在这里查看:https://plnkr.co/edit/kxehpwaat5dezNActZbn?p=preview//.html{{device}}//.tsdevice:number=1;onClick(){lettmp;if(this.device==1){tmp=0;}if(this.device==0){tmp=1;}this.device=tmp;}}

javascript - Angular2 - md-slide-toggle 显示错误的值

我的问题是md-slide-toggle的值正确,但显示错误。例如:开始时值为1,切换处于事件状态。按下开关的时间:值为0但开关仍处于事件状态。按下开关的时间:值为1,但现在开关现在处于非事件状态。...在这里查看:https://plnkr.co/edit/kxehpwaat5dezNActZbn?p=preview//.html{{device}}//.tsdevice:number=1;onClick(){lettmp;if(this.device==1){tmp=0;}if(this.device==0){tmp=1;}this.device=tmp;}}

html - 在 angular2 中构建包装器指令(包装一些内容/组件)

我是Angular2的新建筑指令。我想要的是创建一个弹出指令,它将用一些css类包装内容。内容内容可以是纯文本和标题,例如:HeaderContenttobeplacedhere.然后我想给它一个指令属性,比如:popupHeaderContenttobeplacedhere.指令应该做的是将div包装在里面,比方说:HeaderContenttobeplacedhere.到目前为止我描述的情况是属性还是结构指令。import{Directive,ElementRef,HostListener,Input}from'@angular/core';@Directive({selector

html - 在 angular2 中构建包装器指令(包装一些内容/组件)

我是Angular2的新建筑指令。我想要的是创建一个弹出指令,它将用一些css类包装内容。内容内容可以是纯文本和标题,例如:HeaderContenttobeplacedhere.然后我想给它一个指令属性,比如:popupHeaderContenttobeplacedhere.指令应该做的是将div包装在里面,比方说:HeaderContenttobeplacedhere.到目前为止我描述的情况是属性还是结构指令。import{Directive,ElementRef,HostListener,Input}from'@angular/core';@Directive({selector