我想知道是否有办法使用Angular Material md-colors指令进行渐变?
https://material.angularjs.org/1.1.1/api/directive/mdColors
由于
答案 0 :(得分:3)
使用 protected void configure(HttpSecurity http) throws Exception {
http .csrf().disable()
.authorizeRequests()
.antMatchers("/css/**", "/index").permitAll()
.antMatchers("/user/**").hasRole("USER")
.antMatchers("/tryadmin").hasRole("ADMIN")
.antMatchers("/try").hasRole("USER")
.and()
.exceptionHandling()
.authenticationEntryPoint(entryPoint)
.and()
.formLogin()
.usernameParameter("username")
.passwordParameter("password")
.successHandler(loginSuccessHandler)
.and()
.sessionManagement()
.enableSessionUrlRewriting(true)
.maximumSessions(1);
}
指令似乎不行,但您可以以编程方式执行此操作 - CodePen
标记
md-colors
JS
<div ng-controller="AppCtrl as ctrl" ng-cloak="" ng-app="MyApp" layout-fill layout-padding layout="column">
<div style="background: linear-gradient({{ctrl.color1}}, {{ctrl.color2}})" flex></div>
</div>
请注意,这不适用于IE。来自docs: