这是一个来自stackoverflow的问答,三哥直接把最佳回答搬过来了. 都说AngularJS的学习曲线异常诡异~~~ Q: “Thinking in AngularJS” if I have a jQuery background? A: 1. Don't design your page, and then change it with DOMmanipulations In jQuery, you design a page, and then you make it dynamic.
/*适用情况:比如提交一个表单,提交完成之后在页面展示一条提示消息. 控制器里面这样写: 单条消息: */ \Yii::$app->getSession()->setFlash('error', 'This is the message'); \Yii::$app->getSession()->setFlash('success', 'This is the message'); \Yii::$app->getSession()->setFlash('info', 'T
适用情况:比如提交一个表单,提交完成之后在页面展示一条提示消息. 控制器里面这样写: 单条消息: \Yii::$app->getSession()->setFlash('error', 'This is the message'); \Yii::$app->getSession()->setFlash('success', 'This is the message'); \Yii::$app->getSession()->setFlash('info', 'This i